Zambian President Edgar Lungu has taken the oath of office after the nation's top court rejected an opposition petition to block his inauguration.
Mr 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," Mr Lungu said.
He had averted a run-off election by winning just over 50% 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 fuelled by the fall in prices of copper - its main export.
Mr Mugabe, who has led Zimbabwe since the end of white minority rule in 1980 and has been accused of vote-rigging in the past, described Mr Lungu's victory as "a reflection of the will of the people".