A top UN World Food Programme employee in Somalia has been freed after six days of detention by government forces.
Many people displaced by this year's fighting depend on food aid
Idris Osman was seized in an armed raid on the UN compound in the capital, Mogadishu, allegedly as part of an investigation into unspecified crimes.
The United Nations Secretary General Ban Ki-moon had condemned the arrest as "forceful and illegal".
Mr Osman's arrest halted the UN's food distribution to some 75,000 people displaced by recent fighting.
There has been no word yet of when UN food aid will resume in the city.
"We welcome the release of Idris Osman, and are pleased that he will be reunited with his family," said WFP Executive Director Josette Sheeran in a statement.
Mr Osman, a 57-year-old lawyer, is the head of the WFP's operations in Mogadishu and has worked for the UN in Somalia for the past 12 years.
On Friday, Somali interim Prime Minister Ali Mohamed Ghedi said the WFP head was "under investigation", but despite repeated questioning he refused to specify what crime the UN employee was suspected of committing.
Mr Ghedi had promised that if Mr Osman were found "innocent", he would be released unconditionally.
The prime minister's own position is said to be tenuous as a result of a falling-out with Somalia's interim President Abdullahi Yusuf Ahmed.
The BBC's Africa editor Martin Plaut says that because control of food aid is a key weapon in winning popular support, whoever is seen to control the aid is in a powerful position.
The resurgence of violence in Somalia since the ousting of Islamists by Ethiopian-backed troops in December last year has forced out most aid agencies leaving the UN and a few others to run limited operations.
Thousands of people have been displaced in and around the capital.
Meanwhile thousands more people are reported to be displaced from Las Anod after fighting between the breakaway states of Puntland and Somaliland.
Puntland's Information Minister Abdirahman Mahamud Bankah has said up to 20,000 people had fled their homes and were in desperate need of food, shelter and medical assistance.