NAIROBI, Kenya — One is the self-proclaimed champion of the “hustle nation.” The other is a veteran leftist making his fifth run for high office. Both are products of Kenya’s calcified political system, which is mired in corruption, yet they claim to be able to transform it – if elected president. The bitter race for leadership of the East African nation of Kenya culminates on Tuesday as 22 million registered voters face a choice between William Ruto, 55, currently the country’s deputy president, and Raila Odinga, a 77-year-old political veteran who is making his fifth bid for the presidency. Days after the vote, the race was a flicker — a testament to Kenya’s maturing democracy, which, despite its flaws, stands in contrast to other African countries where once-high democratic hopes have given way to fake votes and military coups in recent years. For its Western allies, that’s one reason why Kenya — a growing technology hub, an important partner in counterterrorism and an anchor of stability in a region wracked by hunger and strife — matters more than ever. However, elections in Kenya have a history of messy, unpredictable affairs. Previous polls have been marred by widespread violence, lengthy courtroom dramas and, in 2017, the assassination of a senior election official just days before the polls. So far this time around, the election season has been largely calm, with a few more hopeful signs of change. The corrosive ethnic politics that have dictated Kenyan politics for decades are showing signs of abating. Fewer people left their homes before the vote – fearing that the houses might burn down – than before. On Tuesday, Kenyans began lining up outside polling stations before dawn, with voting running smoothly across the country by midnight despite reports of delayed openings in some areas and difficulties with the biometric system used to identify voters in others. The results are expected to start coming in later in the week – along with, almost inevitably, allegations of cheating by the loser – so anxious Kenyans will be holding their breath until then. The two main contenders differ in both style and substance. Mr Ruto is the self-proclaimed champion of Kenya’s “hasters” — the masses of disaffected youth, many of them poor, struggling to make it in life. “Every Hustle Matters” is the slogan written all over his campaign vehicle. Supporters of William Ruto, currently Kenya’s vice president, in his bid to become the country’s president, during the final day of campaigning at the Nyayo National Stadium in Nairobi. Odinga, who has been running for high office since the 1990s, cheered at his campaign rally at Kasarani Stadium in Nairobi on Saturday.Credit…Monicah Mwangi/Reuters Mr Ruto is determined and ambitious, although he also has a reputation for being ruthless. A decade ago, he was on trial at the International Criminal Court on charges of orchestrating violence following the 2007 election, in which more than 1,200 people were killed. The case collapsed in 2016 after the Kenyan government withdrew its cooperation and key witnesses recanted their testimony. Mr Odinga, the scion of a storied Kenyan political dynasty, offers familiarity – he has been running for high office since the 1990s – as well as a sense of historical vindication. His numerous failures to win the presidency have deepened a sense of grievance among his fellow Luo, Kenya’s fourth-largest national group, who have never held the country’s top job. He was widely praised for his choice of running mate, Martha Karua, a lawyer with a history of principled activism who, if elected, would be Kenya’s first female vice president. Mainly, however, Mr Odinga’s success in this election is due to a political alliance, known as “the handshake”, he achieved in 2018 with President Uhuru Kenyatta. That deal ensured that Mr Kenyatta, from the ruling Kikuyu ethnic group, backed Mr Odinga – and in turn made an enemy of Mr Kenyatta’s deputy, Mr Ruto, who spent much of the campaign criticizing his former boss. The winner needs 50 percent of the vote, plus one more. But a third candidate, George Wajackoyah – who is campaigning on a platform of legalizing marijuana and, more unusually, the sale in China of hyena testicles, said to have medicinal value – could be a spoiler. If Mr. Wajackoyah can convert his support base, estimated at 3 percent in one poll, into votes, he could deny the main candidates a majority and push the vote into a runoff.