Kenyan President Mwai Kibaki was sworn into office on Sunday, moments after being announced as the winner of a fiercely opposed election that preceded accusations of vote rigging and riots.
Tension over the election has led to violence in many of the poorer areas of the country, where opposition leader Raila Odinga is widely popular.
Black smoke billowed from Nairobi's expansive shantytown Kibera on Sunday, home to at least 700,000 people.
Rioting has continued for the past two days as people set up road blocks and built bonfires. Young men in the streets shouted accusations that Kibaki had fixed the election and demanded his removal from office.
"These are our guns," said Cliff Owino, 24, holding up a handful of rocks the Nairobi slum of Mathare. "But a voting card is our atomic weapon."
Violence around the country has killed at least 15 people since Saturday, authorities said.
The election results were read on live television on Sunday. Elections chief Samuel Kivuitu said that Kibaki's Party of National Unity had beat Odinga's Orange Democratic Movement by 231,728 votes.
It was the closest election the country's history.
"This means Honourable Mwai Kibaki is the winner,'' Kivuitu said.
Earlier, hecklers yelled out "This is not a police state!" and "Justice!" shortly after Kivuitu began reading results out live on national television. Police holding clubs escorted elections officials from the room.
Kibaki was sworn in at the State House shortly after the results were announced. He was first elected president in a landslide victory in 2002, ousting the notoriously corrupt Daniel arap Moi.
"We have done our nation proud and set a good example for the rest of the continent," he said.
The opposition, which had held a razor-thin lead in the country's presidential election vote-counting on Saturday, has accused the administration of election fraud.
ODM party official William Ruto said they have determined the election results were 4,215,437 for Odinga and 3,748,261 for the incumbent Kibaki.
If the election commission has other results, they must explain themselves, he said.
The European Union's chief election monitor said there are undoubtedly problems with the voting process.
"Our observers have been turned away from several tallying centers without being given results," said Alexander Graf Lambsdorff.
The Kenyan Electoral Commission "has not succeeded in establishing the credibility of the tallying process to the satisfaction of all parties and candidates," he said.
Kivuitu acknowledged several problems, such as a constituency where voter turnout was 115 per cent, and another where a candidate ran away with ballot papers.
In response, the commission suspended voting result announcements on Saturday night.
Odinga, 62, had called earlier on Sunday for Kibaki, 76, to concede and demanded a recount. "This government has lost all legitimacy and cannot govern," he said.
With files from The Associated Press