Police in Kenya lobbed tear gas at crowds supporting the prime minister as he filed a petition asking the Supreme Court to void the presidential election, a vote the prime minister says was neither free nor fair.

Prime Minister Raila Odinga's court filing comes a week after Kenya's election commission declared Uhuru Kenyatta - the son of Kenya's founding father - the winner of the country's March 4 vote.

Kenyatta won with 50.07% of the vote, breaking the 50% mark by about 8,000 votes out of 12.3 million cast.

Kenya's election has been largely peaceful, unlike the disputed 2007 vote that sparked two months of violence that killed more than 1,000 people.

But in Nairobi police threw tear gas canisters at Odinga supporters who gathered despite warnings from police.

Later, police lobbed more tear gas at supporters gathered in front of the Supreme Court building.

"It's everyone's right to hold demonstrations, but police will stop demonstrations that may have ramifications on security," said police spokesman Masoud Mwinyi.

"Police are taking precautionary measures to warn people to disperse, but if they don't we will use minimum force. Their presence can create unnecessary tension. Already we are seeing pockets of volatility."

The petition filed today asks the court to set aside the announcement by the election commission on March 9 that Kenyatta and his running mate William Ruto had won the presidency and deputy presidency.

Odinga came in second in the eight-candidate field with 43 % of the vote. He had hoped to keep Kenyatta under the 50 % mark and force a two-man runoff.

The Odinga petition says that the voter register was altered and "mysteriously grew overnight by a large proportion" on the eve of the election. Votes cast exceeded the number of registered voters in several locations, it said, adding that the change in the number of registered voters was to allow the election commission to manipulate the election results.

The petition said that the electronic voter ID and biometric voter registration systems were "so poorly selected, designed and implemented that they were destined to fail," which forced the election commission to revert to a "discredited manual system" that carried risks for abuse and manipulation.

The election commission "failed to establish systems which are accurate, secure, verifiable, accountable and/or transparent and indeed declared results which in many instances had no relation to votes cast at the polling station," the petition said.

If the court upholds Kenyatta's win, he will become the second sitting president in Africa to face charges at the International Criminal Court. He and Ruto both face charges related to having helped orchestrate the 2007-08 postelection violence. Both deny the charges. Ruto's trial begins in late May; Kenyatta's begins in July.

Kenyatta has promised to report to The Hague even if he wins the presidency.

Despite the second straight disputed presidential election, Kenya has for the most part remained at peace during the election period, though vicious online fights between supporters of Kenyatta and Odinga have broken out on Facebook and Twitter.

Odinga has asked for calm from his supporters during a week of news conferences in which his team has claimed the vote was rigged. He has said he will respect the Supreme Court's ruling.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.