A car bomb detonated near Somalia's parliament in the capital Mogadishu, killing at least two people and wounding several others, a senior police officer said.

The bomb exploded on Sunday at a security checkpoint after soldiers intercepted and stopped a suspicious vehicle, Captain Mohamed Hussein told The Associated Press.

Those dead included two soldiers as well as the suicide bomber, he said, while many of the 10 wounded were rickshaw drivers.

A huge cloud of smoke was seen billowing over the area dotted with security checkpoints along a road leading to the presidential palace.

Abdikadir Abdirahman, director of Amin ambulances, the city's sole rescue service, said three people had been killed and another wounded.

A Reuters news agency photographer at the scene saw ruined cars and three-wheeled scooters overturned by the force of the blast.

The attack happened near Somalia's presidential palace, whose main gate is just 200 metres away, and a similar distance from the interior ministry.

There was no immediate claim of responsibility.

Spate of attacks

A few hours earlier, another car bomb outside Mogadishu killed one person plus the driver. Police officer Mohamed Abdi told AP the explosion occurred after soldiers arrived at the scene to inspect the "suspicious" car that had become stuck on a sandy road in the Sinka Dheer area.

The blast comes three days after at least 14 people were killed and 10 others wounded in a car bombing near the Weheliye hotel on the capital's busy Makka Almukarramah road.

Mogadishu is often a target of attacks by al-Shabab, which is fighting to overthrow Somalia's internationally recognised government.

A truck bombing in October killed more than 500 people, an attack claimed by the armed group.

Concerns have been high over plans to hand over the country's security to Somalia's own forces, as a 21,000-strong African Union contingent begins a withdrawal that is expected to be complete in 2020.