"There is an attack near the parliament building. There was a car bomb explosion and gunfire broke out. We don't have details so far," police official Husein Ise told AFP.
Witnesses said Shebab militants, the Al-Qaeda-linked group fighting to overthrow Somalia's internationally-backed government, appeared to be carrying out an attack on the complex while MPs were meeting inside.
It was not immediately clear if gunmen had managed to penetrate the parliament complex, and there were no immediate reports of casualties.
