Zambian opposition leader Hakainde Hichilema has been declared the winner of last week's bitterly contested presidential election.
Mr Hichilema defeated the incumbent, President Edgar Lungu, by a landslide - more than a million votes.
It was Mr Hichilema's sixth attempt at winning the presidency. His supporters have been celebrating on the streets of the capital, Lusaka.
Mr Lungu has accepted defeat and congratulated Mr Hichilema.
In a speech on national TV, he said he was committed to a smooth transfer of power, which is expected in the coming days. However, he repeated his claims that the elections were not free and fair.
In his acceptance speech, President-elect Hichilema extended an olive branch to his predecessor.
"Don't worry, you'll be OK, you won't face retribution or get teargassed," said Mr Hichilema, who was often attacked in what he said were attempts to silence and intimidate him as an opposition leader.
He pledged to be president of all Zambians, whether they voted for him or not.
In its final tally, the electoral commission said Mr Hichilema had won 2,810,777 votes to Mr Lungu's 1,814,201 in Thursday's election. There were seven million registered voters.
The huge margin of victory means there is no need for a run-off.
- REACTION: African opposition leaders hail Zambia's poll winner
- PROFILE: The 'cattle boy' who became president
- QUICK GUIDE: Zambia country profile
Mr Lungu's six-year rule was criticised for alleged human rights abuses, corruption, a failing economy and massive unemployment.
Correspondents say Mr Hichilema, 59, tapped into widespread dissatisfaction among voters.
He now faces the daunting challenge of turning around the country's economic fortunes.
A youth-driven wave of change
Analysis by Nomsa Maseko, BBC News, Lusaka
Celebrations which started on Sunday continued until sunrise as Zambia was painted red by supporters of Hakainde Hichilema.
There's no doubt that that political winds of change were ushered in by young people who are often accused of being reluctant to vote. They turned up in high numbers and generally rejected President Edgar Lungu.
"We want jobs, young people want jobs," chanted throngs of people as they filled the streets of the capital shortly after Mr Hichilema was declared the seventh president of this copper-rich nation.
This will be Zambia's third transfer of power to an opposition candidate, cementing its place as one of Africa's most democratic countries, despite the widespread fears ahead of this closely fought election.
Who is Hakainde Hichilema?
Mr Hichilema was born into humble beginnings in the southern district of Monze.
He managed to get a scholarship to the University of Zambia, and later graduated with an MBA degree from the University of Birmingham in the UK. He went on to become one of Zambia's richest men, with business interests in finance, ranching, property, healthcare and tourism.
Mr Hichilema has described himself as an ordinary "cattle boy" and has contested and lost every election held in Zambia since 2006. However, each time he has increased his share of the vote.
In 2016, Mr Hichilema said the election was stolen from him after he lost to Mr Lungu by just 100,000 votes.
Mr Hichilema has faced problems with authorities since entering politics.
After the 2016 election, he was charged with treason for allegedly failing to give way to the presidential motorcade. He spent four months in a maximum-security jail before the charges were dropped.