Kenya’s Deputy President William Ruto has edged ahead in a tight presidential race, according to official results reported by Kenyan media on Sunday, as more riot police were deployed inside the national election tallying centre after scuffles and accusations by party agents. The fracas underscored fraying tempers and high tensions within the national counting hall as the country waits for official results from last Tuesday’s election. In the presidential race, official verified results reported by the Nation media group showed Ruto taking 51% of the vote, ahead of opposition leader and former Prime Minister Raila Odinga who had 48%. Confusion over vote tallying in the media and the slow pace of progress by the electoral commission have fed anxiety in Kenya, which is East Africa’s richest and most stable country but which has a history of violence following disputed elections. Ruto and Odinga are the leading candidates in the race to replace Uhuru Kenyatta, who is finishing up the second of two five-year terms.

Voting on Tuesday was largely peaceful but the turnout was low, with only 30 percent of the registered 22 million voters showing up as of noon (09:00 GMT), six hours into the vote. By 4 pm (13:00 GMT), the turnout had swelled to 56 percent with long queues of people outside polling stations in the capital, Nairobi. Voting also extended past the official 6 pm (15:00 GMT) closing time at some stations nationwide due to delayed starts. Officially verified results on Saturday from the Independent Electoral and Boundaries Commission (IEBC), with a little more than a quarter of votes counted, put Odinga in the lead with 54% of the vote while Ruto had 45%. The winner must get 50% of votes plus one. The commission has seven days from the vote to declare the winners. A Reuters tally of 255 out of 291 preliminary constituency-level results at 1200 GMT on Sunday showed Ruto in the lead with 52% and Odinga at just over 47%. Two minor candidates shared less than a percent between them. The preliminary tally is based on forms that are subject to revision if any discrepancies are discovered during the official verification process. The many checks and balances are designed to try to prevent the kind of allegations of rigging that provoked violence in 2007 when more than 1,200 people were killed, and in 2017, when more than 100 people were killed.

Kenyatta fell out with Ruto after the last election and has endorsed Odinga for president. Kenyatta leaves power having laden Kenya with debt for expensive infrastructure projects and without having tackled the endemic corruption that has hollowed out all levels of government. The next president will also take on rapidly rising food and fuel costs. On Sunday, Ruto’s party member Johnson Sakaja won the governorship of the capital Nairobi, the wealthiest and most populous of the 47 counties.

The fact that the Kenyan elections will produce only the country’s fifth president since independence in 1963 is monumental considering the calibre of its frontrunners, consummate veterans of the country’s raucous political landscape. For Mr Odinga, this is his fifth attempt at the top job, including running against former President Mwai Kibaki in the 2007 elections that precipitated a bout of ethnic-fuelled violence that left a sordid aftertaste in Kenyan politics. For this election, he has gotten a huge helping hand from outgoing President Uhuru Kenyatta, whom he has run against twice, and who has endorsed him over his own Vice President. Should Odinga emerge victorious in this election, it will be the first time an ethnic Luo will hold the country’s top office. President Kenyatta is a Kikuyu, as were his father Jomo Kenyatta and Mwai Kibaki while Daniel Arap Moi, the country’s longest-serving ruler was Kalenjin as is Mr Ruto, Odinga’s challenger. These three ethnic groups are among the country’s four largest. For self-described hustler Vice President Ruto, a reference to his hardscrabble upbringing has been the bedrock of a campaign where he has sought to position himself as representing the interests of low-income, working-class Kenyans, a claim unavailable to Odinga whose father was the country’s first Vice President before he went into opposition.

Like most African elections, this contest has been identity and personality-driven, increasing the potential for ethnic-driven conflict should violence break out. Notwithstanding, that infamous outbreak of election violence in 2007 led to the birth of a constitution widely acclaimed for strengthening the country’s institutions, particularly the courts and its electoral commission. As a demonstration of that newfound resilience, the Supreme Court annulled President Kenyatta’s re-election in 2017 following a contest marred by widespread electoral irregularities. A separate decision of the High Court authorised as final, the results of the presidential election declared and tallied at polling stations and constituency tallying centres, paving the way for the IEBC to post scans of returns from those stations on its website, and facilitating the uncommon transparency that has ensured that Kenyans, for the first time ever, can see near real-time tallies of returns from media and political outfits. Furthermore, the electoral commission has come in for early praise in this year’s contest for efficiency in vote tallying and transmission, unlike anything it has been able to muster in its history.

Critically, it has been an overwhelmingly peaceful exercise. Kenya as often is the case in this region, is blazing a trail that shows that with much blood and sweat, good things can be accomplished. It remains unclear what economic direction East Africa’s largest economy will take depending on the outcome of the election, as the world waits with bated breath for the results – both leading candidates propose a broad continuation of Kenyattan economics. A very crucial first step in making that direction would be the unqualified acceptance of the vote’s final results by the losing candidate.