Tens of thousands of spectators packed the Kasarani stadium in Nairobi on Tuesday to watch William Ruto being sworn in as Kenya's fifth president following his narrow victory over Raila Odinga in a bitterly fought but largely peaceful election.
Several people were injured as crowds tried to force their way into the stadium. Television footage showed dozens of people falling in a crush at one entrance gate.
Police asked Kenyans to watch proceedings from home after the 60,000-seat stadium was filled before dawn, with many spectators clad in the bright yellow of Ruto's party and waving Kenyan flags.
Twenty heads of state and government attended the ceremony, with Ruto by law obliged to take the oath of office by 2:00 pm (1100 GMT), five weeks to the day since the 9 August election.
The local press is broadly optimistic. "Dawn of Ruto era," trumpets the frontpage headline in The Standard newspaper, while the Star says: "Time for Ruto."
No one can remain blind to the challenges the new leader faces, in a politically polarised country gripped by a cost-of-living crisis and recurrent extreme drought.
The brotherhood of Kenyans
Foreign allies and independent observers have praised the conduct of the vote, which was largely peaceful and free of the violence that has marred past elections in the country of 50 million people.
Ruto won by 200,000 votes out of 14 million cast, but the Supreme Court earlier this month upheld his victory, dismissing his opponents' claims of fraud and mismanagement.
Outgoing head of state Uhuru Kenyatta, who had backed his longtime arch-rival Odinga in the election race, has promised a smooth transfer of power.
Kenyatta finally shook hands with Ruto at a meeting at the presidential residence on Monday after pointedly refusing to congratulate his deputy for several weeks.
Ruto has struck a conciliatory tone, extending a "hand of brotherhood" to his rivals and their supporters.
"We are not enemies. We are Kenyans," Ruto said after the court's decision.
Inflation at a five-year high
Observers say he faces a tough assignment building goodwill after a divisive and expensive political campaign that lasted well over a year and was peppered with acrimony and personal slander.
"This is the time to close ranks, embrace opponents and help forge a united front devoid of cheap political competition," The Standard wrote in an editorial.
Many ordinary Kenyans stayed away from the ballot box, with disillusionment particularly strong among the youth and economic hardship blamed for the low turnout.
The East African political and economic powerhouse is reeling from a once-in-a-generation drought and inflation is at a five-year high.
Kenya is "in a deep economic hole" Ruto admitted at the weekend, repeating his pledge to lower the cost of living.
Among his ambitious promises is the creation of a 50-billion shilling (400 million euro) "hustler fund" to provide loans to small businesses, and a commitment to bring down prices for fuel, grain and fertiliser.
The task of turning around the economic fortunes of the country may not be easy, the International Crisis Group think tank said, urging Ruto to address the challenges rapidly.
"Given sky-high popular expectations and an economy in dire straits, governing may well prove tougher than campaigning," the Crisis Group warned.