Kenyan President Uhuru Kenyatta waves to supporters Tuesday upon his arrival to take the oath of office at the Kasarani stadium in Nairobi. (Simon Maina/AFP/Getty Images)

Kenyan President Uhuru Kenyatta was sworn in for a second term Tuesday amid the thunderous applause of supporters even as pro-government forces fired on protesters angered by the contentious election process that kept him in power.

The inauguration capped an incredibly fraught few months for Kenya that saw an election whose results were annulled, weeks of unrest, an opposition boycott and, finally, a new election that gave Kenyatta 98 percent of the vote, but with a turnout of less than 40 percent.

As Kenyatta was sworn in, police across town opened fire on opposition demonstrators, with reports of at least one dead. An impromptu rally later by opposition leader Raila Odinga was hit by tear gas, forcing his abrupt retreat to his vehicle.

Kenyatta took the oath on the same Bible used by his father — Kenya’s first president, Jomo Ken­yatta — in 1964, and the capacity crowd erupted into cheers in the 60,000-seat Kasarani stadium decked out in the red and gold of Kenyatta’s party. Regional heads of state looked on, including the leaders of Ethiopia, Uganda, Rwanda and South Sudan.

In his speech, Kenyatta noted that the past few months “have been a trying time” but assured the country that the elections “are now firmly behind us.”

Uhuru Kenyatta was inaugurated as Kenya’s president on Nov. 28 after an election re-run and amid deep political divisions. (Reuters)

So many people tried to push into the stadium for the event that police fired tear gas outside the venue to control the crowd.

“This is the day that we have been waiting for. It’s finally here. Our God had done this for us. The elections have tormented and almost destroyed our country. We hope that this will be the beginning of a new chapter,” said Marvin Muriithi Munyua, 30, a businessman. “Let’s now focus on our country.”

The extended election season, stretching from August until the inauguration, exacerbated the deep divisions in Kenya. Support for Kenyatta and his opponent, Odinga, broke along ethnic lines. The business community also backed Odinga, while many
in more-marginalized regions turned to Odinga to try to stem the endemic corruption in the country.

Odinga attempted to stage a parallel prayer rally during the inauguration for those killed in election-related violence. Some 70 people are estimated to have died in confrontations with police over the past few months.

The government declared the rally illegal and blocked the roads leading to an area known as the Jacaranda grounds, preventing it from taking place.

Residents of the area said ­police used live fire to disperse protesters. The residents held up spent cartridges as evidence that gunfire had been used. At least one body could be seen, and the opposition placed the overall death toll as high as five. This figure could not be independently verified.

The crowd chanted “Uhuru must go” and “Thief.”

Odinga supporters barricaded streets in the neighborhood with stones and said the forces attacking them were the Mungiki, a pro-government gang, rather than police.

“They are following people into the houses and killing them,” said one man, who did not provide his name amid the chaos of chanting protesters. “This is not the country we are going to live in. . . . This is more than a dictatorship.”

Before his convoy was hit by tear gas, Odinga spoke briefly to supporters, telling them that “Ken­yatta is not the president of Kenya” and promising that he himself would be sworn in as president Dec. 12.

Odinga withdrew from the Oct. 26 election rerun, saying nothing had been done to address the problems that led the first set of election results to be annulled.

Within hours of Kenyatta’s victory, Odinga said his party, the National Super Alliance, would be transformed into a resistance movement that would use civil disobedience and boycotts to target the government and its corporate backers.

Kenya is East Africa’s most diverse and richest economy, but the election turmoil has harmed economic growth.

Paul Schemm in Addis Ababa, Ethi­o­pia, contributed to this report.