An Iranian fishing vessel and its crew have escaped after being held captive for five months by Somali fishermen, maritime piracy experts said, but it was not clear how many crew members had escaped.

Jaber, an Iranian fishing vessel believed to have up to 19 crew, was captured on March 26, along with another Iranian fishing vessel, Siraj. Local officials accused them of illegal fishing in Somali waters.

Although there are still rare cases of sea attacks, piracy in the Indian Ocean has largely subsided in the past three years, mainly due to shipping firms hiring private security details and the presence of international warships.

John Steed, a regional manager for Oceans Beyond Piracy, said Jaber and its crew escaped and were pursued by pirates who had been holding the ship close to the shore in Ceel Hur, in central Somalia.

"It looks like the captain took the opportunity of a passing helicopter or whatever, when the guards were distracted and were not on the ship ... and cut his anchors and motored out," Steed, who runs a programme helping hostages, said.