Somali pirates holding a German ship with five Germans, three Russians, two Ukrainians and 14 Filipinos on board have received a $2.7 million ransom and are counting it before releasing the ship, a pirate told Reuters.

We have taken $2.7 million ransom for Hansa, a German ship, pirate Abdi told Reuters by phone from Haradhere, a piracy haven.

We are now dividing the money. We shall get down (off the ship) soon.

The German-flagged container vessel Hansa Stavanger was captured about 400 miles off the southern Somali port of Kismayu on April 4.

The release of the 20,000 tonne ship, owned by Hamburg shipping company Leonhardt & Blumberg, was expected last week but it was delayed after the pirates demanded a higher ransom.

Earlier, a Malaysian-owned tugboat held for over seven months was released after a ransom was paid, with 11 Indonesian crew.

Gangs of Somali pirates in the shipping lanes linking Asia and Europe have made millions of dollars in ransom payments from ships hijacked in the Indian Ocean and Gulf of Aden.