A Somali police officer says four militants have been killed while trying to stage an attack on a training compound used for intelligence officials in Mogadishu.

Capt. Mohammed Hussein said Sunday the attack started with a suicide car bombing outside the intelligence school, which killed two attackers. He says soldiers then shot two gunmen who had seemingly lost their way and stormed a civilian house close to their target.

No group has claimed responsibility for the attack but suspicion fell on the al-Qaida-linked al-Shabab group, which is waging an insurgency against the country's Western-backed weak government.

Al-Shabab has vowed it would step up attacks against Somali government and the African Union forces in Somalia during the Muslim holy month of Ramadan.