(CNN) -- An attempted pirate attack was disrupted by U.S. Navy forces supporting Operation Enduring Freedom, officials said Friday.
"We were lucky to be on scene when the attack occurred," said Rear Adm. Terry Kraft, commander of Enterprise Strike Group.
Two helicopters, which were conducting operations with the aircraft carrier USS Enterprise and the USS Leyte Gulf, a guided missile cruiser, were sent to investigate a distress call from a Philippine-flagged merchant vessel in the Arabian Sea, a joint statement said.
The crew aboard the Falcon Trader II reported that suspected pirates were trying to board their vessel, which was about 300 miles northeast of Masirah, Oman, said Wing Commander Paddy Kennedy, of the European Union Naval Force.
The crew then locked themselves in a safe room equipped with food and water and communication abilities that allowed them control over the vessel's steering and propulsion until help could arrive, according to the Navy.
Once military officials were on the scene, one of the Navy helicopters fired warning shots to discourage the pirates from continuing their attack.
The helicopters then followed two pirates, who had jumped off the boat and fled to what officials believed to be a "mother ship," a larger vessel commonly used by pirates to hold hostages to prevent counterpiracy forces from acting directly against them.
Once they were aboard the ship, Navy officials said the pirates began firing at them with small arms, although no one was injured.
"We could definitely see the muzzle flashes from their AK-47s, but we weren't hit," said Lt. Joshua A. Overn, a pilot aboard the helicopter.
The crew of the Falcon Trader II, remained in their safe room until the following morning when Navy forces boarded the vessel, and gave the crew an all clear, officials said.