A Danish-owned boat has been freed after a ransom of $700,000 (£350,000) was paid to Somali pirates, according to a local government official.
Piracy is a major problem for shipping off Somalia
The Svitzer Korsakov tug was captured in February off Somalia's northern semi-autonomous Puntland region.
Puntland's Fisheries Minister Ahmed Said Aw-Nur told the BBC the British captain, Irish engineer and four Russian crew on board were safe.
But he condemned the fact that a ransom was paid to secure their release.
"It can only encourage piracy," he told the BBC Somali Service.
A London-based spokesman for Svitzer declined to comment about reports that a ransom was paid, AP news agency reports.
"Svitzer would like to thank the many parties, agencies and professionals involved for their outstanding efforts in achieving the release of the crew and tug," a statement on the company's website says.
Somali coastal waters are considered to be among the most hazardous in the world.
The US navy patrols Somali waters to try to stop pirates, who last year seized more than 25 ships.
The seizure of ships carrying food aid has made it difficult for donors to help those left homeless by 17 years of conflict and anarchy in Somalia.
Mr Aw-Nur said that he suspected Puntland security officials were working in collusion with the pirates.
If anyone was caught doing so, they would be brought to justice, he said.
He urged the US Navy to do more to try and stop the pirates.
The International Maritime Bureau advises merchant ships to stay at least 200 nautical miles from the Somali coast because of the risk of piracy.