Yahya Jammeh, The Gambia’s authoritarian president of 22 years, has suffered a surprise defeat in presidential elections.
He will be replaced by a property developer, Adama Barrow, who won more than 45% of the vote.
Mr Jammeh, who came to power in a coup in 1994, has not yet spoken since the results were announced.
Electoral commission chief Alieu Momar Njie Njie has appealed for calm as the country entered uncharted waters.
The West African state has not had a smooth transfer of power since independence from Britain in 1965.
Mr Barrow won 263,515 votes (45.5%) in Thursday’s election, while President Jammeh took 212,099 (36.7%), according to the electoral commission. A third party candidate, Mama Kandeh, won 102,969 (17.8%).
“There will be celebrations, there will be disappointment, but we all know we are all Gambia,” Mr Njie said, after announcing the results on Friday.
Born in 1965 in a small village near the eastern market town of Basse, Mr Barrow moved to London in the 2000s where he reportedly used to work as a security guard at an Argos catalogue store, while studying for real estate qualifications.
He returned to The Gambia in 2006 to set up his own property company, which he still runs today.
The 51-year-old won the presidential nomination in 2016 to lead an opposition coalition of seven parties – the largest alliance of its kind since independence, according to the AFP news agency.
On the electoral campaign, Mr Barrow – who has never held public office – promised to revive the country’s economy, which has forced thousands of Gambians to make the perilous journey to Europe.
He has criticised the lack of a two-term limit on the presidency and says he would introduce a three-year transitional government made up from members of the opposition coalition.
Mr Jammeh seized power in a bloodless coup 22 years ago and has ruled the country with an iron fist ever since.
Human rights groups have accused Mr Jammeh, who has in the past claimed he can cure Aids and infertility, of repression and abuses of the media, the opposition and gay people.
In 2014, he called homosexuals “vermin” and said the government would deal with them as it would malaria-carrying mosquitoes.
Several previous opposition leaders were imprisoned after taking part in a rare protest in April.
Mr Barrow has previously described him a “soulless dictator” and promised to undo some of Mr Jammeh’s more controversial moves, including reversing decisions to remove The Gambia from the Commonwealth and the International Criminal Court (ICC).