FILE PHOTO: Somalia's newly appointed Prime Minister Hassan Ali Khaire addresses the Parliament seating where he was confirmed in Somalia's capital Mogadishu March 1, 2017. REUTERS/Feisal Omar

MOGADISHU (Reuters) - Somalian Prime Minister Hassan Ali Khaire has sacked his ministers for foreign affairs, the interior and commerce, replacing them with newcomers, the government said on Thursday, as it battles an Islamist insurgency.

Khaire, a former oil and gas executive, was appointed to the post by President Mohamed Abdullahi Mohamed last February. His government has been criticized for failing to stem attacks by al Shabaab militants.

Foreign affairs minister Yusuf Garaad Omar, interior minister Abdi Farah Said Juha and the commerce and labor minister Khadra Ahmed Duale had been relieved of their duties, the information ministry said in a statement.

They were replaced with Ahmed Ise Awad, Mohamed Abdi Sabriye and Mohamed Abdi Hayir, in the foreign affairs, interior and commerce posts respectively.

There had been a “a dire need” to appoint new ministers to those posts, the statement said, adding the new cabinet members would help the government tackle its heavy workload.

Last year, the defense minister and the head of military were sacked and replaced.

The head of national security and the police commander were sacked after the country’s deadliest truck bomb attack killed 512 people in October. Both posts have yet to be filled.

With the help of African troops, Somalia’s government has been battling the al Shabaab insurgents to try to restore peace in the country following decades of conflict.