An anti-government armed Somali group controlling large swathes of the country has said it will shut down three UN agencies and prevent them from working in areas under its control.
Armed men from the al-Shabab group looted a UN compound in Baidoa in south-central Somalia on Monday following the announcement.
In a statement broadcast on local radio, al-Shabab accused the UN agencies of corruption and allegedly conspiring against Islam.
The agencies affected are the United Nations Political Office for Somalia, the United Nations Development Programme, and the United Nations Department for Safety and Security.
UN officials were not immediately available for comment.
Al-Shabab is fighting to overthrow Somalia's government, and controls large areas of the capital and southern Somalia.
The group is fighting government troops and African Union peacekeepers in the hope of imposing its own strict interpretation of sharia, or Islamic law, throughout Somalia.
The US state department says that the group has links to al-Qaeda, but al-Shabab has denied that.
Speaking about the incident in Baidoa, an unnamed UN officer said that "dozens of well-armed al-Shabab militia" had surrounded the UN compound there.
He continued: "They have taken away three UN cars from the compound, but have not harmed several UN foreign staff."
The town of Baidoa used to house Somalia's interim parliament before it was seized by al-Shabab fighters.