Mogadishu: Militants attacked Somalia’s presidential compound on Tuesday with a car bomb and gunmen broke through a perimeter wall but were repulsed by security forces, and the president was not there at the time, the interior ministry said.

Up to five members of the Al Shabab Islamist group, which claimed responsibility, were killed, Interior Minister Abdullahi Godah Barre told Reuters. Three militants were confirmed dead, and one or two more were believed to have died in the car blast.

The assault was the most dramatic in a string of attacks in the capital Mogadishu by Al Shabab since it launched a campaign during Ramadan.

But President Hassan Shaikh Mohammad was not there at the time as he was at another location attending an iftar.

“I can assure you the president is not hurt and as a matter of fact he was not in the palace,” the minister said, adding the gunmen were repulsed in the car park near the prime minister’s offices and had not made it to the presidential quarters.

It is the second time since February that Al Shabab have attacked the sprawling compound, which includes the presidential buildings and other government offices. Officials said security had been tightened since then, including adding stronger gates.

Officials said the attackers were quickly defeated by Somali security forces and members of the African Union peacekeeping force, which remains the backbone for Somali state security.

However, Al Shabab said fighting still raged after officials said it was finished. “Let them enter the palace and meet us if the fighting is over,” Shaikh Abdiasis Abu Musab, spokesman for Al Shabab’s military operations, told Reuters.

He said their fighters had killed 14 soldiers in the raid, while the minister said there had been no such casualties. The minister also said details of the attack were still not clear and greater clarity would come in the morning.

African Union forces along with the Somali army launched a new offensive this year against Al Shabab. Several towns have been wrested back from the group but officials say the Islamists still control tracts of countryside and some settlements, from where they have been able to continue their guerrilla-style campaign.