A Somali police official says a suicide car bomber struck the entrance of the East African country's traffic police headquarters in the capital, killing four people and injuring nine others.

Mohamed Hassan said Monday that two police officers were among the dead and two armed extremists who tried to storm the traffic police premises in Mogadishu's Abdiaziz district were shot dead.

Somalia's Islamic extremist rebels, al-Shabab, claimed responsibility for the attack, which shattered a period of calm in the seaside city.

Despite being pushed out of Somalia's major cities and towns, al-Shabab, which has ties with al-Qaida, continues to carry out deadly guerrilla attacks across the country.