Shells have been fired overnight at the presidential palace and the venue for forthcoming peace talks in the Somali capital, Mogadishu.
Bombs go off almost every day in Mogadishu
Shooting was also heard in the city's main Bakara market. Nobody has claimed responsibility for the attacks.
At least two people were killed when a mortar bomb landed on their house.
The upsurge in violence comes ahead of a reconciliation conference planned for Sunday, to be attended by more than 1,000 Somalis in the capital.
Attacks on Ethiopian troops and the Somali government have been a regular event since December, when Ethiopian forces ousted the Union of Islamic Courts (UIC), which had been controlling much of southern Somalia.
Somalia has not had an effective national government for 16 years, with rival militias battling for control of different areas.
"Several mortar rounds were fired from the centre of town but all were off target. Some of them hit the nearby buildings but the palace suffered no damage," government security officer Mohammed Ganey told AFP news agency.
The BBC's Mohammed Olad Hassan in Mogadishu says there is an uneasy calm in the capital but the shelling is a clear indication that the city is not safe to host the major conference.
Mogadishu's Bakara market is the city's lifeline
On Wednesday, President Abdullahi Yusuf met diplomats from the European Union, Norway, Italy, Belgium, Kenya and the military adviser of the African Union at his residence in Mogadishu.
The delegation was in the capital for four hours to inspect security arrangements ahead of Sunday's reconciliation conference.
They also held talks with elders from the dominant Hawiye clan but it is not clear whether they will attend the conference.
The Hawiye clan has been opposed to the presence in Somalia of Ethiopian troops.
The clan elders insist that the conference should not be organised around clan allegiances, since the problems in Somalia are political and not clan-based.
Western countries have urged the Somali government to try to include moderate Islamists in the conference but it seems unlikely that anyone from the UIC will attend.