Somali pirates have freed a German cargo ship, Beluga Nomination, after paying a ransom, pirates and maritime officials said on Wednesday.

The cargo ship, with 9,775 dead weight tonnes, was seized in January pirates 390 nautical miles north of the Seychelles with its 12-man crew.

Pirates said they had received $5 million in ransom, but this could not be independently verified.

A spokesman for owners Bremen-based Beluga Shipping did not want to comment on Wednesday on whether a ransom was paid.

“We have received $5 million early this morning. Now we have totally abandoned the ship with its seven crew members behind,” a pirate who gave his name as Ibrahim told Reuters.

Shortly after the ship was seized, Beluga had said three crew members had been killed while attempting to escape while two had successfully fled. The spokesman did not wish to comment on the condition on the remaining crew

Andrew Mwangura, maritime editor of the Somalia Report said the ship, operated under a Antigua and Barbuda flag, was preparing to sail away.

“The ship has been freed. The engine has been re-started and two tug boats are nearby to help it sail away,” Mwangura, who is based in Kenya’s port city of Mombasa said.

Pirate gangs are making tens of millions of dollars in ransoms, and despite successful efforts to quell attacks in the Gulf of Aden, international navies have struggled to contain piracy in the Indian Ocean owing to the vast distances involved. (Reporting by Mohamed Ahmed, and Erik Kirschbaum in Berlin; Editing by George Obulutsa and Alison Williams)