Seven oil workers - including four Britons - have been freed after being held hostage in Nigeria, says American oil giant Exxon Mobil.
Militants have disrupted oil production in the delta
The men were captured on 3 October when gunmen raided a residential compound housing expatriate oil workers in the Niger Delta.
They include one Romanian, one Malaysian and one Indonesian.
Police in Akwa Ibom, the state where the men were kidnapped, say all seven are in good health.
They say the men have been sent to neighbouring Rivers state, where security services will release the men to their various companies.
The British men have been named as Paul Smith, 30, from Peterhead, Graham Mclean, 43, from Elgin, father-of-three Sandy Cruden, from Inverurie, and Graeme Buchan, also from north-east Scotland.
A spokesman for Exxon Mobil said it was pleased the situation had been resolved.
The men were employed by Aberdeen-based Sparrow Offshore and Texas-based Oceaneering International.
A number of Nigerian security guards were killed when armed men were captured at Nancy's Bar inside the Exxon compound at Eket.
Malcolm Wilson, chief operating officer at Sparrows Offshore Ltd, said: "Our men are coming home.
"I'm delighted to tell you that the intensive efforts by the governments and companies involved have been successful in securing the safe release of the three Sparrows employees and those of other companies who were taken hostage in Nigeria 18 days ago."
Mr Wilson said the three freed hostages, employed by Sparrows, had already spoken to their wives by telephone.
"All are delighted at this outcome," he said.
"We have spoken to the men and they are in good spirits, but we have arranged medical checks as a routine precaution before they fly back to the UK.
"These have been difficult days for the men themselves and for their families, and I would like to pay tribute to the great strength they have shown."
Mr Wilson said his firm would not be giving details of communications between government officials and the group which captured the men.
Police said they had no information of the terms of their release.
Despite official denials, in most cases some sort of financial deal is struck with the kidnappers.
Hostage-taking has become a lucrative business for armed groups in the Niger Delta - an area of creeks and swamps about the size of Scotland.
The latest kidnappings come despite Nigeria's President Olusegun Obasanjo promise in September to take strong action to curb the armed groups.
Sixty Nigerian hostages seized in a raid on a flow station run by Shell were freed earlier this month.
The BBC's correspondent in Lagos, Alex Last, said the problem was likely to get worse in the run-up to Nigeria's elections next year as rival politicians hope to use the armed groups in their battles to win power.