Heavy gunfire has broken out at the residence of the Somali president in the capital, Mogadishu, witnesses say.
President Yusuf returned to Mogadishu last week
Unidentified attackers are said to have used mortar fire against Villa Somalia before engaging the presidential guards in a 30-minute exchange of fire.
It is unclear whether Somali President Abdullahi Yusuf was there at the time. There are no reports of casualties.
Mr Yusuf arrived in Mogadishu last week after Ethiopian forces helped oust Islamist militias controlling the city.
The attack on his residence comes hours after Ethiopian Prime Minister Meles Zenawi told the BBC his troops would start leaving Somalia "in the next few days".
Mr Meles said the first phase of the withdrawal could start now that several key warlords had disarmed.
The African Union (AU) is meeting to discuss sending a peacekeeping force to Somalia to replace the Ethiopians.
"The shooting started after a group of gunmen fired the mortars at the Villa Somalia. We don't know who they were," said a resident quoted by AFP news agency.
"Government soldiers as well as Ethiopian troops returned fire towards the area where they thought the attack came from," the unnamed witness added.
Mr Meles said the Ethiopians would withdraw in three phases
Another witness said residents had started fleeing the area.
Government spokesman Abdirahman Dinari said one shell had hit the presidential palace - no-one had been injured.
"Those who ambushed the presidential palace escaped, and this is a cowardly act intended to terrorise the public," Mr Dinari told the Associated Press news agency.
"The culprits wanted to show that Mogadishu was not calm," the spokesman said.
The AU is considering a plan to send nine battalions of troops - some 8,000 men - with maritime, coastal and air support.
Under the plan, three battalions would be deployed as soon as possible, with the rest within six months.
The plan warns that if the African peacekeepers are not deployed before the Ethiopian troops withdraw there is "a very high probability" of an Islamist resurgence.
8,000-strong force proposed:
Uganda: 1,500 troops offered, subject to parliamentary approval
South Africa: Considering but forces stretched
It also calls for the UN to take over the peacekeeping force in the future.
Mr Meles would not guarantee his troops would remain in Somalia until AU peacekeepers had been deployed but said he thought there would be an overlap.
BBC African analyst Martin Plaut says it would take weeks for any troops to be deployed after a firm decision is taken.
He also says the real focus at the moment is on diplomacy, with US officials meeting Islamist leaders in Yemen, to discuss them joining the government.
The Somali government says some 3,500 Islamist fighters remain in hiding in Mogadishu.
Our correspondent says that unless the Islamists can be brought into the governing of their country, there is little prospect that any number of African or United Nations troops can bring peace to Somalia.
The US and the UN envoy to Somalia Francois Fall have both urged President Yusuf to form an inclusive government.