Kenya's President Uhuru Kenyatta secured a second term in office, the election commission announced on Friday, but the opposition rejected the result saying the process was undermined by fraud.
Kenyatta got 54.3 percent of Tuesday's vote, ahead of rival Raila Odinga who secured 44.7 percent, according to figures released by election commission head Wafula Chebukati. Nearly 80 percent of the 19 million registered voters cast their ballots.
Many Kenyans fear a repeat of the violence that followed the 2007 contested election, when about 1,200 people were killed and hundreds of thousands displaced as protests over the result led to ethnic killings.
There were reports Friday that minutes after the election results were announced police fired tear gas to contain political protests in the western city of Kisumu city, an opposition stronghold, and Mathare, a Nairobi slum, Reuters witnesses said.
Speaking after the result was announced, Kenyatta offered an olive branch to the opposition, urging national unity and peace.
"I reach out to you, I reach out to all your supporters," Kenyatta said in comments directed at Odinga. "To our brothers, our worthy competitors, we are not enemies, we are all citizens of the same republic."
Earlier on Friday, the opposition, led by Odinga, who has lost the last two elections amid complaints of fraud, said it rejected the process after its complaints had not been addressed.
"We raised some very serious concerns, they have not responded to them. As NASA [opposition coalition], we shall not be party to the process they are about to make," senior opposition official Musalia Mudavadi told reporters.
James Orengo, one of Odinga's lieutenants and an election agent for the opposition coalition, said the process had been a "charade."
He praised the Kenyan people's history of standing up to stolen elections and said there were "constitutional alternatives" to challenging any result, but he stopped short of calling for protests.
"Going to court, for us, is not an alternative. We have been there before," he said.
"The Kenyan people have never disappointed. ... Every time an election has been stolen, the Kenyan people have stood up to make sure changes are made to make Kenya a better place."
WATCH: Uhuru Kenyatta Declared Winner of Kenya Election
Access to data
Earlier, Orengo had called for the candidates and observers to be given access to the election commission's computer servers so there could be a transparent audit of data from 41,000 polling stations across the country.
Yakub Guliye, election commissioner in charge of information technology, said the opposition had not made a formal request and it would not act on a verbal request.
Normal procedure calls for the commission to release final results after cross checking its electronic tally with paper forms.
Odinga's camp has said figures released by the commission since Tuesday's vote were "fictitious" and that "confidential sources" within the commission had provided figures showing Odinga had a large lead in the race.
The election commission rejected the claims, pointing out they contained basic mathematical errors.
Security across Kenya
Police had beefed up security across much of Kenya — particularly in opposition strongholds in the west and parts of Nairobi — in anticipation of the announcement of the election result on Friday.
Kenya is the leading economy in East Africa and any instability would be likely to ripple through the region.
Odinga is a member of the Luo, an ethnic group from the west of the country that has long said it is excluded from power.
Kenyatta is from the Kikuyu group, which has supplied three of four presidents since Kenya gained independence from Britain in 1963.
International observers have given the thumbs-up to the vote and U.S. Ambassador Robert Godec issued a statement on behalf of the diplomatic community calling for any complaints to be channeled through the courts, not street protests.
"If there are disputes or disagreements, the Kenyan constitution is very clear on how they are to be addressed. Violence must never be an option," he said on Friday. "Now is the time for leaders, across the political spectrum, to demonstrate their commitment to [the] constitution and to the institutions it creates and the values it sets out."
But the opposition criticized foreign observer missions, which included former South African president Thabo Mbeki and former U.S. Secretary of State John Kerry, saying they should have been vetted ahead of the vote.
"The observers largely served the interests of the government," Orengo said.
As well as a new president, Kenyans also elected new lawmakers and local representatives. Some of those races have also been disputed, leading to violence in Garissa and Tana River counties.