Kenya's Supreme Court on Saturday upheld Uhuru Kenyatta's presidential election victory, throwing out a petition over irregularities brought by his rival Raila Odinga, who conceded defeat for the sake of national unity.
Clashes immediately erupted between youths and the police in Kisumu, the biggest town in Odinga's western region stronghold, leaving at least two people with gunshot wounds, an AFP reporter said.
A police officer in Kisumu, who asked not to be named, said seven people in all sustained gunshot wounds after the police opened fire but there was no immediate confirmation.
The protestors were initially dispersed by the police but they then reassembled later in the evening to hurl stones at cars and motorbikes, injuring several people. The AFP reporter said shops were looted and passers-by robbed as sporadic gunshots rang out.
In Nairobi in late afternoon police used tear gas to disperse supporters of Odinga who were protesting in the city centre.
Incidents and tensions were also reported in early evening in slum areas traditionally loyal to Odinga. Nairobi's police chief said reinforcements had been sent to those parts of town. He spoke of "clashes " but did not elaborate.
The six judges of Kenya's top court dashed Odinga's last hopes of victory by unanimously ruling that the March 4 election had been fair and credible and that Kenyatta and his running mate had been "validly elected".
"The presidential election ... was conducted in a free, fair, transparent and credible manner in compliance with the provisions of the constitution and all relevant provisions of the law," Chief Justice Willy Mutunga said.
"It is the decision of the court that the 3rd and 4th respondents (Kenyatta and his deputy William Ruto) were validly elected," Mutunga said.
The ruling paves the way for Kenyatta, the son of Kenya's first president and one of Africa's richest men, to be sworn in as head of state on April 9.
The six judges dismissed petitions filed by Odinga, outgoing prime minister and Kenyatta's main rival in the presidential race, and by civil society groups, over what they claimed was a series of irregularities that skewed the election results.
The petitioners had called for fresh elections to be ordered.
-- Odinga wishes his rival well --
Odinga said he accepted the court's ruling and wished his rival well.
"The court has now spoken," Odinga said, adding that while he might not agree with all its decisions his faith in the constitution "remains supreme".
The announcement of his defeat in the last elections in 2007, when he ran against the now outgoing president Mwai Kibaki, led to Kenya's worst violence since Independence, with more than 1,100 dead and several hundred thousand forced to flee their homes.
Kenyatta for his part thanked his rival and said the court ruling was "a victory for all the Kenyans" who turned out to vote on March 4.
"I want to assure Kenyans that our government will be as inclusive as possible and will reflect the face of our great country," Kenyatta said.
Television footage from Gatundu, the town where Kenyatta was born and raised, showed motorbike riders sounding their horns in triumph as they drove down the main street.
The White House, Britain, France and the European Commission all congratulated Kenyatta on his victory.
Contrary to China and several African nations, western countries had avoided congratulating the president-elect until the Supreme Court made its ruling.
Kenyatta and Ruto both face trial at the International Criminal Court in The Hague for crimes against humanity over their alleged role in planning the 2007-2008 post-election violence.
Several European ambassadors had said ahead of the vote that if Kenyatta was elected they would limit themselves to only essential contact with him.
Kenyatta was declared the winner on March 9 by the electoral commission.
Official results showed president-elect Kenyatta won 50.07 percent of the votes -- just making it over the 50-percent threshold needed to avoid a second-round ballot by some 8,000 votes.
Odinga's camp and civil society groups argued there were irregularities -- in the voter register, during the ballot and in tallying.
The Supreme Court judges will make public the arguments behind the decision within the next two weeks, Mutunga said.
Both the March 4 vote and the announcement that Kenyatta had won went off without major violence, disproving fears of a repeat of the 2007 violence.
Both the vote and the court ruling were followed closely within Kenya and outside the country, which after the violence that followed the last polls, had lost its image of a beacon of stability in the region.