Updated

Somali security forces shot dead three extremists and foiled an attempted al-Shabab attack on the presidential palace that began with a car bomb exploding, police said Saturday.

The confrontation came a week after an attack on the nearby interior ministry compound in Mogadishu killed at least nine people, again raising questions about the state of security in the most sensitive areas of Somalia's capital.

Six people were dead in all including a suicide car bomber, Capt. Mohamed Hussein told The Associated Press, saying the situation had calmed and security in the area was being tightened.

The midday attack began when a car bomb detonated near a checkpoint close to the presidential palace after security forces engaged with gunmen. A second car bomb exploded in the same area shortly afterward, Hussein said.

"There were skirmishes between security forces and the attackers and then we had a big blast and a huge boom. The blast knocked me down," one witness, Osman Ali, told the AP.

The Somalia-based al-Shabab extremist group, an arm of al-Qaida, often targets high-profile places in the capital. It claimed responsibility for Saturday's attack, saying its fighters were conducting a "major operation" around the palace and nearby SYL Hotel.

Al-Shabab was blamed for the October truck bombing in Mogadishu that killed more than 500 people in the deadliest attack in the country's history.

The threat from what has become the deadliest Islamic extremist group in sub-Saharan Africa has hurt efforts to strengthen Somalia's fragile government and stabilize the long-chaotic Horn of Africa nation.

The United States under the Trump administration has stepped up military efforts in Somalia, including dozens of drone strikes, against al-Shabab and a small presence of fighters linked to the Islamic State group. At least two U.S. military personnel have been killed.

The U.S. military and others in the international community have expressed concern about the plan for Somalia's security forces to take over the country's security from a multinational African Union force over the next few years, saying the local troops are not yet ready.

___

Associated Press video journalist Mohamed Sheikh Nor in Mogadishu contributed.

___

Follow Africa news at https://twitter.com/AP_Africa