William Ruto was sworn in as Kenya's fifth president on Tuesday, a week after the Supreme Court rejected a challenge by his defeated opponent in a close-fought election he won by portraying himself as an underdog "hustler" battling the elite.
Deputy president for the last decade, Ruto must now confront an economic crisis in East Africa's wealthiest and most stable nation, where food and fuel prices are surging, unemployment is high and public debt rising.
"A village boy has become the president of Kenya," Ruto said at the ceremony, as the crowd erupted in cheers. As severe drought exacerbates a major food crisis in East Africa, he promised to make 40 million half-price bags of fertiliser available next week.
The 55-year-old won last month's election despite a public repudiation by his boss, outgoing President Uhuru Kenyatta, who said Ruto was "not fit for office." Both sides hurled accusations of corruption during a deeply personal, acrimonious campaign.
Kenyatta's preferred successor, veteran opposition leader Raila Odinga, had accused Ruto of cheating his way to victory. But Odinga accepted the Supreme Court ruling upholding the result, laying to rest fears of political violence like that seen after disputed elections in 2007 and 2017.
"There should be no revenge," Bishop Mark Kariuki thundered at Tuesday's ceremony, wearing a deep purple stole embroidered "PEACE."
Odinga did not attend but Kenyatta shook hands with Ruto before he was sworn in and issued a congratulatory message the night before. Ruto in his speech asked Kenyatta to continue leading regional peace efforts in neighbouring Ethiopia and African Great Lakes countries.
The peaceful transfer of authority will burnish Kenya's democratic credentials in a region where some leaders have held power for decades.
Ugandan President Yoweri Museveni, in office for 36 years, and Ismail Omar Guelleh, who has been Djiboutian president for 23 years, were among many African leaders attending.
Ruto greeted each head of state by name before laying out his next steps in his speech.
He pledged to make the police financially independent from the president's office, and to stick to Kenya's plans to produce 100% clean energy by 2030.
Hours later Ruto signed an executive order appointing four court of appeal judges, as well as an environment and a land court judge, he said on Twitter.
Ruto supporters wearing his party's colours of yellow and green had packed Nairobi's 60,000-seat Kasarani Sports Centre by 5 a.m. They danced and waved miniature national flags to the strains of a band.
"He is our fellow youth! I know he will bring us more opportunity," said dancer Juma Dominic as he and his troupe warmed up.
The National Police Service had tweeted that the stadium was full by 5 a.m. and asked citizens to stay home, but crowds continued to try to force their way inside. The St John's Ambulance Service said it had taken several injured people to hospital.
Ruto, a former roadside chicken seller who is now a wealthy businessman, campaigned as challenger to the powerful families that have dominated Kenyan politics since independence in 1963. Odinga and Kenyatta are the sons of the nation's first vice president and president respectively.
That message - represented by his party symbol of a wheelbarrow - resonated with chronically underemployed youths and families squeezed by poverty and rampant corruption, which Kenyatta publicly acknowledged he was unable to rein in.
One of Kenya's most prominent civil society activists, Boniface Mwangi, on Monday said that over-confidence, disorganisation and Kenyatta's embrace had doomed Odinga's campaign.
"Every time Uhuru spoke on behalf of the party, we suffered," he wrote, pointing out that Kenyans had suffered hardship and corruption for 10 years while Kenyatta and Ruto were in charge.
($1 = 120.3000 Kenyan shillings)