Somalia's newly appointed Prime Minister Hassan Ali Khaire attends the Parliament seating where he was confirmed in Somalia's capital Mogadishu March 1, 2017.

Somalia’s parliament ousted Prime Minister Hassan Ali Khaire in a no-confidence vote on Saturday, the speaker of the house said, due to criticism of his efforts to tighten security in the country.

The vote also followed a dispute over the timing of a national election. Khaire, President Mohamed Abdullahi Mohamed and the heads of regional governments have been in talks this week to try to agree if it should go ahead in February 2021.

Lawmakers voted 170-8 to remove Khaire from office, parliamentary speaker Mohamed Mursal Sheikh Abdirahman said.

“The prime minister failed to establish national security forces to tighten security for the federal and state governments,” he said.

Khaire, a former oil company executive, was not immediately available for a comment.

President Mohamed, said in a statement carried on state radio that he had accepted the decision of lawmakers to remove Khaire, citing the need to preserve the unity of the various arms of government.

“He will soon appoint a new prime minister,” said the statement posted on the state radio’s website.