At least two people have been killed after a barrage of mortar shells was fired into Mogadishu's main airport shortly after a UN plane landed there.
The attack in the Somali capital came 15 minutes after a nine-member UN delegation arrived at the airport from Kenya on Wednesday, but there was no indication it was the target.
Passengers and workers at the airport panicked as two of the mortars landed inside the terminal.
Mohammed Abdi said: "We heard the first shell behind us, and then another one struck the ground near us, and a third one hit between us and the main road and we took off to seek cover."
The airport serves as a base for Ethiopian troops who helped the interim Somali government overthrow Islamic courts fighters late last month.
The UN delegation, from the UN refugee agency and the office for the co-ordination of humanitarian affairs, was taken to the UN compound in Mogadishu where they were meeting with Somali officials as planned.
Witnesses said Somali police forces and Ethiopian troops sealed off the airport and surrounding neighbourhoods after the attack and then assaulted civilians.
A cafe owner at the airport said he had been shot by police.
"Peace is possible if the interests of US and the Ethiopians are removed"
Ahmed, Bossaso, Somalia
Send us your views
He said: "Ethiopian troops and Somali police came into my restaurant and beat us very badly. I sustained a small gunshot wound, but I am getting treatment in the hospital."
A police official, who requested anonymity, said "the beating was a case of mistaken identity".
Muhamoud Yassin, a taxi driver, said the situation remained tense: "People are not allowed to and from the facility. There is a heavy security presence."
The attack came a day after a first batch of Ethiopian troops began pulling out of Mogadishu, even though a proposed 7,600-strong African Union (AU) peacekeeping force has yet to be deployed.
Nigeria confirmed on Wednesday that it will send soldiers to join the peacekeeping force but many still doubt that the AU will be able to deploy such a large force and fear a power vacuum if peacekeepers do not arrive before Ethiopian troops leave.
US officials confirmed on Wednesday that the US had conducted a second air strike in Somalia.
The new air strike came two weeks after an AC-130 plane killed what Washington said were eight al-Qaeda fighters hiding among Islamist remnants pushed to Somalia's southern tip by Ethiopian and Somali government forces.
Washington believes Somali Islamists have protected al-Qaeda members accused of bombing US embassies in Kenya and Tanzania in 1998 and an Israeli-owned Kenya hotel in 2002.