It was not immediately clear if there were any casualties in the earlier mortar strikes on Mogadishu's international airport.
One reporter said gunmen launched eight mortars, but only two struck the airport. People at the airport scattered immediately at the sound of the first blast.
Somalia's deputy defense minister, Salad Ali Jelle, refused to comment, saying officials were investigating.
Al Jazeera's correspondent in Mogadishu, Mohammed Adow, said the attacks were the latest in a string of operations against the government and the allied Ethiopian troops.
The attacks are being undertaken by remnants of the Islamic courts movement joined by clan militias, some of whom are not happy with the Somali interim government.
The Islamic courts fighters, defeated in a December confrontation with the government and Ethiopian troops, supported by clan militiamen, have vowed to attack any peacekeepers or government allies.
"We are not imposing anything on Somalis. We know our mandate; we will work toward restoring law and order in Somalia"
Paddy Akunda, Ugandan forces' spokesman
Skirmishes have occurred on an almost daily basis since the government took over the capital in late December.
The Ugandans are the vanguard of an African Union force to help the government tame a country mired in anarchy since the 1991 ouster of Mohamed Siad Barre.
The last peacekeeping mission there, a US-UN operation, ended in the mid-1990s after relentless fighting with heavily armed local militiamen.
Paddy Akunda, the Ugandan forces' spokesman, said 400 troops were on the ground so far in Mogadishu, with the remaining 1,100 expected in the next 24 hours.
"We are very happy to be the first African Union peacekeepers to Somalia. We are welcomed here," Akunda said during the ceremony.
"We are not imposing anything on Somalis. We know our mandate; we will work toward restoring law and order in Somalia without targeting anybody."