In this photo taken on Saturday, March 3, 2018, Mayor of Mogadishu Abdirahman Omar Osman looks on, in Mogadishu. Somalia's government says the mayor of Mogadishu has died after being badly wounded in an al-Shabab extremist attack in his office last week. (AP Photo/Farah Abdi Warsameh)

MOGADISHU — Somalia's government said Thursday the mayor of Mogadishu has died after being badly wounded in an al-Shabaab extremist attack in his office last week.

The spokesman for Somalia's president said Abdirahman Omar Osman died Thursday in Qatar, where he had been airlifted for treatment after the July 24 attack. Officials said he had been in a coma.

The Somalia-based al-Shabab and officials have said a

It was not clear how the bomber managed to enter the mayor's office, as visitors are required to pass through at least four metal detectors.

Osman had been a councillor in London before returning to Somalia to enter local politics. Somalia's president expressed condolences and said Osman's service as mayor had been selfless.

The U.S. mission to Somalia in a tweet called Osman "an excellent partner and tireless advocate for the people of Mogadishu and all Somalis."

AP