MOGADISHU (Reuters) - The mastermind of militant car bombs that killed 26 people and injured nearly 40 others in Mogadishu in 2017 was executed in Somalia on Monday, the prosecutor of the military court said.

Abdulle Bule said al Shabaab member Abdikadir Abukar was convicted of being behind a hotel bombing that killed 10, one near the ministry of sport that killed nine, and a car bomb near an Italian restaurant in the capital that killed seven.

Al Shabaab wants to overthrow the weak, U.N.-backed Somali government and impose strict Islamic law.

It has steadily been losing territory since African Union peacekeepers arrived a decade ago, but still carries out frequent bombings in the capital.

At least 13 people were killed and 17 wounded in a car bomb attack claimed by the al Qaeda-linked group close to the president's residence in Mogadishu on Saturday.

(Reporting by Abdi Sheikh; Editing by Clement Uwiringiyimana and Alison Williams)