"She's free. She's preparing to sail out," he said.

Ransom payment

Hassan, one of the pirates, told the Reuters news agency: "We have agreed to solve our disagreements and release the ship. It is free and sailing away now."

He said that its crew of 16 Filipinos, nine Greeks, two Ukrainians and a Romanian were all safe.

The ransom, delivered on Sunday, was believed to be between $5.5m and $7m.

A $3m ransom was paid for the release of another oil tanker, the Sirius Star, in January 2009. Similar ransoms have been paid subsequently for the release of merchant vessels.

The Maran Centaurus, carrying two million barrels of oil, was captured in November on its way from Kuwait to the US.

World powers, including the European Union, Nato and the United States are running naval patrols off the Somali coast in an effort to protect commercial shipping.

In response, the pirates have extended their reach, attacking ships up to 1,800km from Somalia, deep in the Indian Ocean.