Islamic militants from Al Shabab force their way in to presidential palace in Mogadishu and exchange heavy gunfire with troops and guards.

Somalis gather after a militant attack on the presidential palace in Mogadishu in February. The compound was attacked again on Tuesday, with Al Shabab claiming responsibility.

By:Abdi GuledThe Associated Press, Published on Tue Jul 08 2014

MOGADISHU, SOMALIA—Somalia’s government said its troops have retaken the presidential palace in the capital of Mogadishu Tuesday, after Islamic militants forced their way in and exchanged heavy gunfire with troops and guards.

Loud explosions and gunfire could be heard inside the heavily fortified compound, which has been the subject of many attacks by Al Qaeda-linked militants over the years.

After more than two hours of fighting, Somalia’s presidency said in a Twitter update that “the shameful attack” had been foiled by Somalia’s armed forces and African Union peacekeepers.

It said the “attack is over” and the compound has been secured. It gave no details about any casualties or what happened to the militants.

Al Shabab claimed responsibility for the attack, saying in a radio broadcast that its fighters had penetrated the presidential palace.

Somali President Hassan Sheikh Mohamud was not inside at the time of the attack, but the prime minister and the speaker of parliament were, said Capt. Mohamed Hussein, a senior police official.

The presidency said both Mohamud and Prime Minister Abdiweli Sheikh Ahmed were safe.

The attack was the second assault on the presidential palace this year, and it marked the first time militants have been able to breach the compound and take offensive positions inside. The palace is protected by government troops and African Union peacekeepers who helped to drive Al Shabab militants out of their bases in Mogadishu in 2011.

The attack started when a car bomb exploded outside the presidential compound. Gunmen then entered the palace, police officer Mohamed Abdi told The Associated Press.

Police said the militants, who were armed with grenades, split up into groups and tried to take control of different buildings in the compound.

Al Shabab, which has links with Al Qaeda, has vowed to step up attacks during the Muslim holy month of Ramadan.

Al Shabab militants have previously carried out deadly attacks against lawmakers, UN staff and government officials. Last year the group attacked an upscale mall in Nairobi, the capital of neighbouring Kenya, which has sent troops to fight the militants under the African Union banner.

Militants killed four people Saturday when a car laden with explosives blew up near the parliamentary building in Mogadishu.