Lusaka - Zambian President Edgar Lungu called for national unity in his inauguration speech on Tuesday, as a defeated opposition candidate dismissed the ceremony as "illegal and unconstitutional".
Lungu, who first took power last year, won the August 11 election by around 100 000 votes but his opponent Hakainde Hichilema has alleged that the result was riddled with fraud.
The inauguration was held at a Chinese-built sports stadium in the capital, with regional dignitaries including President Robert Mugabe of neighbouring Zimbabwe in attendance.
"Now that the elections are over, we must say as a people that we stand as united as ever," Lungu told tens of thousands of spectators, vowing to prioritise reviving the country's stumbling economy.
"There is no time and latitude to settle scores. We have work to do," he said. "It is our duty that as citizens of this country we are on this journey together and be peaceful."
Hichilema, a wealthy businessman who has run five times for president, has accused Lungu, the election commission and court judges of all being guilty of fraud over the vote result.
"This inauguration is illegal and unconstitutional," Hichilema said in a statement sent to AFP.
"There has been no (court) ruling that president Lungu has been validly elected. We are drifting to the law of the jungle. The truth is that our election was stolen."
Hichilema stopped short of calling for street protests but urged Zambians to "fight for your rights".
"You can't have free, fair and transparent elections in this country under this leadership," he said.
On Monday, the supreme court rejected Hichilema's final bid to delay the ceremony.
Official election results put Lungu narrowly ahead on 50.35% against 47.63% for Hichilema among a field of nine candidates - just enough to avoid a second-round run-off.
Lungu, 59, first took office last year after beating Hichilema in a snap election, and has since faced falling prices for copper - the country's key export - soaring unemployment and inflation rising to over 20%.
Zambia is known for its relative stability but the election campaign was marked by clashes between supporters of Lungu's Patriotic Front (PF) and Hichilema's United Party for National Development (UPND).
The country has not experienced the widely-feared violence during a delayed vote count and subsequent court hearings.
Zambia last held a peaceful transfer of power to an opposition party in 2011 when Michael Sata became president.
Sata died in 2014, and the 2015 election gave Lungu the right to finish Sata's term.
Lungu, a trained military officer and lawyer, has used his short stint in office to present himself as the rightful heir to Sata, who enjoyed widespread popularity.
The president has described himself as an "ordinary Zambian of humble beginnings" though he has a tough reputation and on the campaign trail warned he would "sacrifice democracy for peace" if necessary.
On social issues, Lungu revealed a conservative side after the arrest of two Zambian gay men in 2013.
"Those advocating gay rights should go to hell," he said. "That issue is foreign to this country."
Lungu suffers from recurring achalasia, a condition caused by narrowing of the oesophagus, and was flown to South Africa for treatment last year after collapsing in public.
Zambia, a British colony until 1964, recorded GDP growth of 3.6% last year - its slowest rate since 1998.