Some 200 Somali officials were listening to a poetry reading to mark the president's anniversary as shells were landing nearby, AFP reports.President Sheikh Sharif Sheikh Ahmed, a moderate Islamist and former insurgent leader, was elected after UN-sponsored talks in neighbouring Djibouti but his government remains weak.He was declared the winner of an election by Somali MPs on 31 January 2009.
Al-Shabab, which denies charges it is linked to al-Qaeda, controls most of southern Somalia, while the government, backed by the peacekeeping mission, is in charge of a a few areas of Mogadishu.
The BBC's Mohamed Moalimuu in Mogadishu says it was the heaviest fighting in the city for several months.
He says there was intense shelling which went on for several hours overnight.
Our reporter says the attack is a clear statement of intent from the insurgents.
The Islamist group said two of its fighters had been killed, along with an unknown number of AU and government troops.It said it launched the attack in response to government plans to take control of the whole city."I don't have the full figures but I know that three of the dead are a mother and her two children," Mogadishu ambulance service head Ali Musa told AFP news agency.The attack also comes a day after Djibouti said it would send 450 troops to bolster the 5,000-strong AU force from Uganda and Burundi.
Al-Shabab has been fighting a pro-government militia for control of the central town of Beledweyne in recent weeks.Somalia has been wracked by violence for some 20 years.