Gunmen fired mortars at the residence of Somalia's president on Sunday, wounding at least five civilians, witnesses said.
Local resident Said Mohamud Dhore said he saw five mortars land inside the presidential compound and one in a residential area, where five civilians were hit.
"We could see a huge ball of smoke over the compound as the mortars exploded," Dhore said.
President Abdullahi Yusuf returned to the war-ravaged Somali capital on Saturday after a trip abroad to seek medical treatment.
Gunmen immediately began firing mortars, said residents, but a presidential guard, speaking on condition of anonymity because he was not authorised to speak to the press, said that the president was unhurt by Saturday's and Sunday's attacks.
Thousands of Somalis were killed and wounded last year in fighting between government troops and their Ethiopian allies and Eritrean-backed Islamic insurgents.
The conflict is complicated by a tangled web of clan loyalties and the involvement of the two historically antagonistic foreign powers using Somalia as a proxy battleground.
The impoverished Horn of Africa nation last had a functioning government in 1991, when warlords overthrew dictator Mohamed Siad Barre and then turned on each other. (AP)