The European Union's anti-piracy force said Somali pirates have freed a cargo ship that had been captured nearly a year ago - but that the crew had to abandon the vessel a short time later because it was sinking.

The EU force said authorities received a distress call Wednesday from the Rak Afrikana, a few hours after it was released from pirate control.

It says the crew warned that the ship was taking on large amounts of water due to hole in the hull.

A statement said EU and Italian warships immediately came to the ship's aid and rescued the 25 crew members. It said the sailors were in satisfactory condition, considering they were captive for 332 days.  

It was not immediately clear what caused the damage to the ship, or whether the Rak Afrikana is still afloat.

Somali pirates have hijacked dozens of ships in recent years and taken in hundreds of millions of dollars in ransom money. The EU anti-piracy task force said pirates are holding more than 30 vessels and nearly 700 hostages.

Some information for this report was provided by AFP.