Somalia's national security minister has resigned after an attack by al-Shabab fighters on the country's parliament.
The resignation of Abdikarim Guled late on Saturday came after the group set off powerful car bombs outside parliament and fighters armed with explosive vests, grenades and machine guns stormed into the building while scores of politicians were meeting.
"You are aware of the cowardly attack that the violent elements carried out on the parliament. I extend my condolences to the families of the deceased...Considering the current situation of the country, I officially hereby announce my resignation," Guled said.
At least 10 security officers died in the incident and at least a dozen people were injured. A police spokesman said seven fighters died in the attack, the Reuters news agency reported.
The minister had already been criticised over a spate of high profile attacks in the capital Mogadishu during the past few months, including against heavily-guarded sites such as the presidential palace and airport.
Al-Shabab was pushed out of fixed positions in Mogadishu by African Union (AU) troops, but has continued to strike inside the city.
Attacks have targeted the government and security forces in an apparent bid to discredit claims by Somali authorities that they are winning the war against the group.
Al-Shabab claimed responsibility for Saturday's assault, describing parliament as a "military zone" and saying it was a "holy operation".
AU troops launched a new military operation in March against al-Shabab bases and although they seized some towns, the fighters are thought to have fled in advance and suffered few casualties.