Four Chinese sailors who were kidnapped last month in the port of Libreville, the capital of Gabon, have been released, the Chinese consulate in Lagos said.
A Nigerian security source separately told AFP Tuesday that the four had been freed in a military operation.
"The consulate general in Lagos cooperated with the relevant embassies and local Chinese enterprises and overseas Chinese groups to carry out rescue efforts, and the hostages were released safely," according to a statement posted on the consulate's website.
Consul-general Chu Maoming visited the freed sailors before they went home, said the statement, dated Sunday.
The four had been seized by pirates in Libreville harbour on December 22. A Gabonese captain was also killed.
The statement did not give details of their release, but a source in the Nigerian security services said Tuesday they had been rescued by a "combined team of (the Nigerian) Joint Task Force".
The forces took part in a mission, codenamed Operation Delta Safe, it said.
The rescue unfolded in seas off the estuary of the Escravos River in Warri South West, a district in Nigeria's Delta State, the source said.
Pirate attacks are unusual in Libreville port, but are notoriously frequent in the surrounding Gulf of Guinea.
A vast expanse which stretches some 5,700 kilometres (3,500 miles) from Senegal to Angola, the Gulf of Guinea has eclipsed the notorious waters off Somalia to become the world's epicentre for pirate attacks, lootings and kidnappings for ransom.
Much of the problem originates in the Niger Delta, a base for pirates who use high-powered speedboats to raid passing ships and kidnap crews.
- Rising numbers abducted -
The number of sailors abducted in the Gulf of Guinea rose by 50 percent last year, the International Maritime Bureau (IMB) reported on Tuesday.
The tally jumped from 78 in 2018 to 121 last year, amounting to over 90 percent of kidnappings reported at sea worldwide, it said in its annual piracy report.
In November, two Filipinos, a Greek and a Georgian, crew members on an oil tanker, were abducted off of the Togolese capital Lome and nine Filipino seamen were snatched off of Cotonou, the economic capital of Benin.
On January 8, the Nigerian navy said three foreign sailors -- two Russians and an Indian -- who had been kidnapped the previous week were saved by a navy team in the coastal state of Ondo.
Criminal gangs in the past used to steal cargoes of oil, but have switched tactics to kidnapping sailors for ransom as crude prices have fallen.
The attacks have seriously disrupted international shipping routes and had huge economic costs.
In 2017 alone, the cost to West Africa was estimated at over $818 million (735 million euros), including naval activities and contracting security services, according to a report from Oceans Beyond Piracy, a programme that studied maritime attacks.
The Nigerian Navy has a special forces unit trained to intervene against pirates