Somali pirates freed a Bangladesh-flagged cargo vessel and its 23 crew early Sunday after the shipowners paid a ransom, the company said.

The MV Abdullah was carrying more than 55,000 tonnes of coal from Maputo to the United Arab Emirates when it was seized by dozens of pirates around 550 nautical miles (1,000 kilometres) off the Somali coast a month ago.

The seizure came amid a surge in Somali pirate activity, with international naval forces diverted from the Gulf of Aden into the Red Sea to guard against attacks on shipping by Yemen's Iran-backed Huthi rebels.

The MV Abdullah's owners, KSRM Group, negotiated with the bulk carrier's captors and the vessel sailed for Dubai early Sunday Bangladeshi time, a spokesman said.

"We struck a deal with the pirates," said Mizanul Islam of SR Shipping, the group's maritime arm.

"We cannot say more about the money," he told AFP, adding: "All the crew are safe and secure."

The vessel's capture came after the first successful case of Somali piracy since 2017 was recorded in December.

A series of incidents since then has fuelled concerns about a resurgence of Indian Ocean raids by opportunistic pirates exploiting a security gap after the redeployment of international forces.

Huthi gunmen have launched scores of attacks in the Red Sea and Gulf of Aden targeting what they deem to be Israeli-linked vessels in response to Israel's war against the Palestinian militant group Hamas in Gaza.

Naval forces -- including from India, Sri Lanka and the Seychelles -- have since freed fishing boats seized by gunmen and thwarted other attempted attacks.

Last month, Indian commandos boarded and recaptured the vessel seized in December, the Maltese-flagged MV Ruen, around 260 nautical miles (480 kilometres) off the Somali coast.

All 17 hostages were rescued and 35 alleged pirates were brought to Mumbai to face prosecution.

Analysts say that the Somali pirate threat remains well below its 2011 peak, when gunmen launched attacks as far as 3,655 kilometres from the Somali coast in the Indian Ocean.

It fell off sharply after international navies sent warships and commercial shipping deployed armed guards.