Security has been stepped up in the Kenyan capital, Nairobi, ahead of the inauguration of President Uhuru Kenyatta for a second term in office.
People in festive mood have been pouring into a stadium where more than 20 heads of state or senior ministers are expected to attend.
Opposition leader Raila Odinga mocked Mr Kenyatta’s “coronation”, saying he had not been elected legitimately.
He boycotted the re-run of the presidential poll last month.
Just under 39% of voters turned out on 26 October and Mr Kenyatta, who officially won with 98% of the vote.
The original election on 8 August was held over again after being annulled by the Supreme Court on grounds of irregularities.
Who is in Nairobi?
Organisers are expecting about 60,000 people to fill Nairobi’s Kasarani sports stadium where the inauguration is taking place, with giant screens set up outside for those unable to get in.
“I’m sure Uhuru will be able to bring people together and unite them so we can all work for the country,” Eunice Jerobon, a trader who travelled overnight from the Rift Valley town of Kapsabet for the inauguration, told Reuters news agency.
Police fired tear gas to control crowds trying to enter the venue early on Tuesday.
Inside the stadium itself, foreign dignitaries have been taking their seats in a calm, good-humoured atmosphere.
Among the foreign leaders expected to attend are Israeli Prime Minister Benjamin Netanyahu, Ugandan President Yoweri Museveni and Rwandan President Paul Kagame.
Why was there an election re-run?
Chief Justice David Maraga said the August election had not been “conducted in accordance with the constitution” and declared it “invalid, null and void”.
The Supreme Court ruled that the result had been “neither transparent nor verifiable”.
But Mr Odinga urged his supporters to boycott the second vote because he said no reforms had been made to the electoral commission since the original poll.
Correspondents say the election dispute has left Kenya deeply divided.
About 50 people are reported to have been killed in violence since the August ballot.
How are the opposition responding?
Mr Odinga promised to hold a “memorial rally” in another part of Nairobi to honour those killed during the four months of political upheaval since the August vote.
“We actually call it coronation other than an inauguration because we don’t believe that he’s the legitimately elected leader of Kenya,” he told the BBC.
According to the opposition leader, Mr Kenyatta was elected by “just a small section of the country”.
Reuters reports that police have sealed off the area chosen for the opposition rally and fired tear gas at people trying to gather.
In the opposition stronghold of Kisumu, in the west of the country, local people told BBC News they were not happy with the inauguration.
“I am going to peacefully accept and move on but I won’t recognise this presidency,” said one man.
“I don’t even think I’d ever go to any government office to seek for services because I know it’s a government that has come to office by force, it has killed people to be there.”
A woman said Mr Kenyatta had not won fairly.
“A large part of the country did not vote – Kisumu being a major part that did not vote – and so we feel that it’s not time to move on,” she said. “It will not be an easy thing to do.”