(CNN)Zambian President Edgar Lungu has officially conceded to opposition leader Hakainde Hichilema following his landslide election victory on Monday.
After initially indicating he may challenge the result, Lungu addressed the nation on Monday saying: "Based on the revelations issued at final results, I will comply with the constitutional provisions for a peaceful transition of power.
"I would therefore like to congratulate my brother, the president-elect, His Excellency Mr Hakainde Hichilema, for becoming the seventh Republican President."
The electoral commission said Hichilema got 2,810,777 votes against Lungu's 1,814,201, with all but one of the 156 constituencies counted.
Lungu thanked the people of Zambia for giving him the "opportunity to be your president".
"I will forever cherish and appreciate that authority you've invested in me. Countrymen, women in and the youth, all I ever wanted to do was to serve my country to the best of my abilities.
"Of course, there were challenges on the way. But what I appreciated most, with your support during the tough times.
"Lastly, I'd like to thank all those who voted for my party, the Patriotic Front, and myself. To you, I say your vote was not in vain. Please continue supporting us."
It is the third time that power has shifted peacefully from a ruling party to the opposition since the southern African country's independence from Britain in 1964.
There was a huge turnout of mostly young people, some who came dressed in their academic robes to protest lack of employment post graduation.
Joseph Kalimbwe, a youth representative of Hichilema's UPND party told CNN.
"Young people gave us the vote. Four million young people between the ages of 18 to 24 registered to vote. It was a huge turnout and it was very personal to them. They want to ensure the mistakes of their parents were corrected. They have voted for our leader on basis he has better policies and ideas and can strengthen our state institutions."
Dancing and singing
Across Zambia, celebrations broke out in the streets as Hichilema's supporters wearing the red and yellow of his United Party for National Development (UPND) danced and sang, while drivers honked their horns.
Celebrations could be short-lived however: Zambia is in dire financial straights, and it became the continent's first pandemic-era sovereign default in November after failing to keep up with its international debt payments.
That was owing to an explosive mix of depressed commodity prices - which had pushed Zambia into recession well before the pandemic - and a brutal slowdown in economic activity caused by the pandemic itself.
Hichilema, 59, a former CEO at an accounting firm before entering politics, now faces the task of trying to revive Zambia's fortunes. The economy has been buoyed only slightly by more favorable copper prices - now hovering around decade highs, driven partly by the boom in electric cars.
Africa's biggest copper miner
Last year, Zambia, Africa's second biggest copper miner, produced a record output of the metal.
International Monetary Fund support is on hold until after the vote, as is a debt restructuring plan seen as an early test for a new global plan aimed at easing the burden of poor countries. read more
Lungu, 64, has yet to concede defeat, and has indicated that he might challenge the result, which will be difficult, given the margin.
Lungu said on Saturday that the election was "not free and fair" after incidents of violence against ruling Patriotic Front party agents in three provinces, and the party was consulting on its next course of action.
UPND officials dismissed Lungu's statement as emanating from people "trying to throw out the entire election just to cling on to their jobs."
If Lungu wants to settle a dispute or nullify elections, he must approach the Constitutional Court within seven days to lodge a complaint after a winner is announced.
Hichilema's win reverses a narrow loss in the 2016 presidential election against Lungu.