Kenya has banned protests in three major city centres following weeks of demonstrations by opposition supporters.

Fred Matiangi, acting internal security minister, said rallies are banned in the central business districts of the capital, Nairobi, the country's second city - Mombasa and the opposition stronghold of Kisumu.

"Protecting the lives and properties of the people of Kenya is not negotiable," Matiangi told a press conference in Nairobi on Thursday.

"We have noted with great concern the escalation of lawlessness, breach of peace and public order during demonstrations organised by NASA," Matiangi said.

The National Super Alliance, NASA, is the coalition opposition.

{articleGUID}

"Due to the clear present and imminent danger of breach of peace and public order as witnessed in recent demonstrations, the government notifies the public that, for the time being, we will not allow demonstrations within central business districts of Nairobi, Mombasa and Kisumu," Matiangi said.

The East African country has been gripped by protests after President Uhuru Kenyatta was declared the winner of the August 8 election.

Last month, the country's Supreme Court annulled the vote and called for a rerun of the poll.

But opposition leader Raila Odinga, Kenyatta's main challenger, pulled out of the race this week after claiming his demands were not met. Announcing his withdrawal on Tuesday, Odinga said: "All indications are that the election scheduled for 26 October will be worse than the previous one."

The opposition had requested that some of the electoral officials in charge of the last poll should be replaced, calling for daily protests until their demands were met.

Those daily protests should start next week, the opposition has said.

Kenyatta, for his part, insists that the election rerun must go ahead.

Philip Zeal Chebunet, a lecturer and political communication expert at University of Eldoret, told Al Jazeera the government had no choice but to ban protests in central business districts.

"The government had to put in place everything to ensure the properties and the people of Kenya are safe. It appears they are handling the situation based on the Constitution. And I believe in the next few days everything will be in order and back to normal," Chebunet said.

Kenya's parliament passed an election law amendment on Wednesday stating that if one candidate withdrew from the rerun vote, the remaining one would automatically win. The vote was boycotted by opposition legislators.

The law aimed to ensure Kenyatta could be declared president if he faced no challengers.