At least 10 people, including soldiers, civilians, and a deputy minister, were killed when a car bomb followed by gunfire targeted government buildings in the Somali capital Mogadishu on Saturday, officials said.
Mohamed Bulle, a police officer, told Anadolu Agency over the phone that the double car bomb blast targeted the Labor Ministry and Public Works and Housing Ministry buildings.
"After the blasts, gunmen stormed the building," he added.
Five of the terrorist attackers were among the dead, and the wounded were rushed to hospital, he said.
Somali Prime Minister Hassan Ali Khayre also confirmed the attack, saying: "I expressed my condolences to the families of the victims of today's cowardly terrorist attacks in Mogadishu, including Deputy Minister for Labour and Social Affairs Saqar Ibrahim Abdalla, who was killed in the attack".
Al-Shabab, which is fighting to establish its own rule based on a strict interpretation of Sharia law, claimed responsibility for the attack and said one of its fighters had rammed the ministry building with a car bomb, allowing others to enter it.
"We are inside the building and (the) fighting goes on. We shall give details later," Abdiasis Abu Musab, al-Shabab's military operation spokesman told Reuters.
The building is located not far from the headquarters of the Somali intelligence agency.
Turkey later on Saturday condemned the terror attacks in Mogadishu.
The Turkish Foreign Ministry said in a statement: "We strongly condemn the terrorist attacks perpetrated against the Ministry of Labor and Social Affairs and the Ministry of Public Works in Mogadishu."
"We wish Allah's mercy upon those who lost their lives, a speedy recovery to the wounded and convey our condolences to the friendly and brotherly Government and people of Somalia," the statement read.
The al-Qaida-linked al-Shabab frequently carries out suicide bombings targeting public places and government offices. Hotels and restaurants are also attacked.
Al-Shabab, Africa's most active extremist group, has been fighting for years to take power in Somalia.
The group continues to mount lethal attacks despite being pushed out of Mogadishu. It mostly operates from rural areas in the country's south.
Earlier this month, at least 20 people died in an attack in Mogadishu which saw al-Shabab militants battling security forces for nearly 24 hours.
The group also claimed responsibility for a March 7 car bombing near a restaurant in the capital that killed four people and wounded nine.
African Union peacekeepers stationed in Mogadishu and elsewhere in the country have helped Somali forces to keep al-Shabab fighters at bay. They were ejected from Mogadishu in 2011 and has since been driven from most of their other strongholds.
The group has carried out many deadly attacks in neighboring Kenya in retaliation over Kenya's deployment in 2011 of peacekeepers in Somalia as part of the African Union mandated peacekeeping force AMISOM that helps defend Somalia's central government.
The U.S. military has carried out a number of deadly airstrikes in recent months against al-Shabab.