Mortars fired towards Somalia's parliament have missed their target but instead killed seven people in the surrounding area, witnesses and officials said.
Residents said one school was hit in the attack on Saturday.
"I saw the dead bodies of four children who were killed by the mortar which destroyed one of the classrooms and four other children were also injured," Hasan Moalim, a witness, said.
Several people were taken to hospital with serious injuries.
One of the projectiles hit a police unit, killing one policeman and injuring four, police said.
The Somali parliament was in session at the time of the attack, though the prime minister and speaker had just left.
"The mortars started to land near the parliament building when the session ended and the MPs had just passed a national budget," Osman Ilmi Boqore, the deputy parliament speaker, said.
No group had immediately claimed responsibility for the attack.
Armed groups have taken control of sizeable parts of Somalia.
Just days before the attack, Sheikh Hassan Dahir Aweys, the Islamist opposition leader, returned from exile and said fighters would continue their battle against the government.
PHOTO CAPTION
A Somali government soldier stands guard outside Somalia's parliament in the capital Mogadishu, April 18, 2009.
Agencies