Updated

Danish special forces stormed a ship captured by armed Somali pirates Friday and freed the 25 crew on board, marking the first time a warship has intervened during a hijacking, naval spokesmen said.

After the vessel Ariella sent out a distress signal early Friday, the Danish warship Absalon sent a helicopter to confirm the presence of pirates, and communicated with the crew to ensure they were in a safe location, said Cmdr. John Harbour, spokesman for the European Union Naval Force.

"Once NATO were absolutely sure that the crew onboard were safe and not going to be caught up in any cross fire, the decision was made to send in the specialist teams," said Lt. Col. Wolfgang Schmidt, a spokesman for NATO's Lisbon-based Joint Command.

Ten Danish special forces aboard the Absalon approached the Ariella in an inflatable dinghy, he said. The forces scaled the side of the ship and freed the 25 crew, who had locked themselves in a secure room, and continued to search the vessel for the pirates.

In the meantime, sailors from the nearby Russian Navy ship Neustrashimyy boarded and detained pirates aboard a second skiff, said Schmidt.

Harbour praised the NATO forces for their fast reaction and coordination with other forces in the area.

"There's been many instances where there's been excellent cooperation and three, four or even five nations have helped deter a pirate attack," he said. But, he added: "This is the first where a warship has been able to send forces to stop a hijacking while it was in progress."

Warships typically do not intervene in hijackings because of the danger that crews may be hit by crossfire. Forces were able to intervene in this case because the ship had registered with naval authorities, was traveling along a recommended transit corridor and was part of a group transit, ensuring the ships had a helicopter within 30 minutes' reaction time, Harbour said.

Denmark rarely releases information on operations carried out by its elite forces, but the storming of the ship may have been carried out by the country's elite Frogman Corps, which were part of a NATO deployment.

"There is an operation going on down there and we're involved. It is still going on right now," Pernielle Kroer, spokeswoman for the Danish Navy told The Associated Press.

The Antigua and Barbuda-flagged Ariella sent out a distress signal early Friday that was picked up by the Indian warship Tabar in the Gulf of Aden. The Indians relayed the signal to a French plane overhead, which spotted a group of armed pirates on the deck. Then the Danish troops were notified.

The ship has a crew of 25, including a Bulgarian, a Slovakian, an Indian, 15 Filipinos, and 7 Ukrainians, the EU Naval Force said. They are all safe.

Other EU and American forces have intervened in pirate hostage situations, but not during the hijacking itself.

French commandos stormed a yacht last April with five hostages on board but one, skipper Florent Lemacon, was killed during the operation. American snipers also shot dead three pirates in April 2009 holding an American captain hostage on board a lifeboat after the crew of the Maersk Alabama had persuaded the pirates to leave the main ship.

Details on the nationalities of the crew on board the Arielle and its cargo were not immediately released.

Somali pirates have seized three ships this year and hold a total of nine vessels and more than 180 crew.

Piracy is one of the few ways to make money in Somalia, an arid, impoverished land torn apart by civil war. The government does not hold its own capital and can't send forces to counter the flourishing pirate bases that dot its 1,900-mile-long coastline.