By Richard Lough and Duncan Miriri
NAIROBI (Reuters) - The son of Kenya's founding president, Uhuru Kenyatta, won the presidential election by a tiny margin with 50.03 percent, provisional results showed on Saturday, avoiding a run-off after a race that has divided the nation along tribal lines.
Kenyatta faces trial for crimes against humanity after the disputed 2007 presidential vote that unleashed tribal blood-letting.
If he is declared the winner by the election commission, which has still to announce the official result, Kenya will become the second African country after Sudan to have a sitting president indicted by the International Criminal Court.
The United States and other Western states said before the vote that a Kenyatta win would complicate diplomatic ties with a nation viewed as a vital ally in the regional battle against militant Islam.
From the early hours of Saturday after provisional results emerged, Kenyatta's joyous supporters thronged the streets of Nairobi and his tribal strongholds, lighting fluorescent flares and waving tree branches and chanting "Uhuru, Uhuru".
But tensions rose in the heartlands of Kenyatta's rival, Prime Minister Raila Odinga, who trailed with 43.28 percent of votes. "No Raila, no peace," Odinga supporters chanted as security forces stood by in Kisumu, a city where violence flared in 2007.
A close adviser to Odinga, who lost in the 2007 race, said his candidate would not accept the result and would launch a legal challenge if Kenyatta was officially declared the victor.
"He is not conceding the election," Salim Lone told Reuters, speaking on behalf of Odinga. "If Uhuru Kenyatta is announced president-elect then he will move to the courts immediately."
Odinga's camp had said during tallying that the ballot count was deeply flawed and had called for it to be halted. But they promised to pursue any disputes in the courts not the streets.
International observers broadly said the vote and count had been transparent so far and the electoral commission, which replaced an old, discredited body, promised a credible vote.
To win in the first round, a candidate needed more than 50 percent votes. Kenyatta, the deputy prime minister, achieved that but with a margin of only 4,100 votes of the more than 12.3 million ballots cast.
Provisional figures displayed by the electoral commission showed Kenyatta won 6,173,433 votes out of a total of 12,338,667 ballots cast. Odinga secured 5,340,546 votes.
The first-round win, which must be officially confirmed on Saturday by the Independent Electoral and Boundaries Commission (IEBC), means Kenyans who waited five days for the result will not now face a second round that would prolong uncertainty.
Both sides relied heavily on their ethnic groups in a nation where tribal loyalties mostly trump ideology at the ballot box. Kenyatta is a Kikuyu, the biggest of Kenya's many tribes, Odinga is a Luo. Both had running mates from other tribes.
John Githongo, a former senior government official-turned-whistleblower, urged the rival coalitions, Odinga's CORD and Kenyatta's Jubilee, to ensure calm. "Jubilee and CORD, what you and your supporters say now determines continued peace and stability in Kenya. We are watching you!" he said on Twitter.
How Western capitals deal with Kenya under Kenyatta and the extent they would be ready to work with his government will depend heavily on whether Kenyatta and his running mate William Ruto, who is also indicted, cooperate with the tribunal.
"It won't be a headache as long as he cooperates with the ICC," said one Western diplomat. "We respect the decision of the majority of the Kenyan voters."
Both Kenyatta and Ruto deny the charges and have said they will work to clear their names, though Kenyatta had to fend off jibes during the campaign by Odinga that he would have to run government by Skype from The Hague.
Kenyans hope this vote, which has until now passed off with only pockets of unrest on voting day, would restore their nation's reputation as one of Africa's most stable democracies after killings last time left more than 1,200 dead.
Many Kenyans have said they are determined to avoid a repeat of the post-2007 chaos that brought the economy to a halt.
Church leaders in Kisumu, in the west of Kenya that was devastated five years ago, sought to defuse tension this time.
"Our vote was stolen and we're angry," said Denis Onyango, a 28-year-old mechanic, as hundreds of supporter gathered with members of the security forces nearby. "Why did they bring such huge security here if the vote was to be free and fair."
But some in the city accepted the outcome, more confident this time round that Kenya's institutions had ensured a fair vote. "I urge our candidate to forget the presidency and let the will of God prevail," said cloth vendor Diana Ndonga.
Many shops stayed closed as a precaution in the port city of Mombasa, another Odinga stronghold, but streets were calm.
"We are heading for a bleak future where the economy goes down and international relation sour because of the ICC case," said Athumani Yeya , 45, a teacher in the city.
But some were hopeful that Kenyatta could bring change.
"We are celebrating. Even with the ICC case in Holland, the people of Kenya still have faith in him," said Thomas Gitau, 25, a bare-foot car washer on a main Mombasa street. "We hope he can fix infrastructure and security so we have more jobs."
Odinga's camp had said even before the result that they were considering a court challenge. That is a change from 2007, when Odinga said he could not trust the judiciary at the time to treat the case fairly.
Kenyatta's camp had also complained about delays in counting and other aspects of the process.
But many Kenyans said this race was more transparent. Turnout reached 86 percent of the 14.3 million eligible voters.
(Addigional reporting by James Macharia, Beatrice Gachenge and George Obulutsa in Nairobi, Hezron Ochiel in Kisumu and Drazen Jorgic in Mombasa; Writing by Richard Lough and Edmund Blair; Editing by Alison Williamsr)
(c) Copyright Thomson Reuters 2013. Check for restrictions at: http://about.reuters.com/fulllegal.asp