Zambian President Edgar Lungu on Tuesday took the oath of office after the nation's top court rejected an opposition petition to block his inauguration.
Lungu, who was re-elected last month in a closely contested vote, was sworn in at a packed stadium ceremony that included a 21-gun salute and traditional dancers. It was attended by regional leaders including Robert Mugabe of Zimbabwe and Ian Khama of Botswana.
"We have a great task ahead of us. We need to work as one Zambia, one nation," Lungu said.
He had averted a runoff election by winning just over 50 percent of the votes, but the opposition under challenger Hakainde Hichilema alleged there were polling irregularities and went to court.
Zambia's record of peaceful transitions of power had been held up as a democratic model in Africa, but the recent campaign was marred by street clashes.
The political tension has been exacerbated by Zambia's economic struggles, which are fueled by the fall in prices of copper, its main export.
Mugabe, who has ruled Zimbabwe since the end of white minority rule in 1980 and has been accused of vote-rigging in the past, described Lungu's victory as "a reflection of the will of the people."