Lazarus Chakwera has been sworn in as president of Malawi after winning an election rerun.
He defeated incumbent Peter Mutharika with 58.57% of the vote in Tuesday's poll, the electoral commission announced late on Saturday.
In February, Malawi's constitutional court annulled Mr Mutharika's victory in the May 2019 election, citing vote tampering.
The country was bitterly divided in the run-up to this week's election.
Other countries in Africa have had elections annulled - it happened in Kenya in 2017 - but for the opposition candidate to then go on and win a rerun is unprecedented, correspondents say.
Speaking ahead of Saturday's results, Mr Mutharika said that while he found the election "unacceptable", it was his "sincere hope that we should take this country forward instead of backwards."
Saulos Chilima, Mr Chakwera's running mate, was also sworn in as vice-president at a ceremony in the capital, Lilongwe.
Mr Chakwera, a Pentecostal preacher and former theology lecturer, will first have to heal a nation that has been through many months of political turmoil.
Why was there a new vote?
A rerun of the 2019 election was ordered after the Constitutional Court found the original ballot had been marred by widespread irregularities.
That election saw President Mutharika narrowly re-elected by fewer than 159,000 votes.
Mr Chakwera, who came second in that election, argued that tallying forms had been added up incorrectly and tampered with.
Uncertainty around the result sparked months of tension, which spilled over into clashes between opposition supporters and police.
February's annulment led some to celebrate, but Mr Mutharika described it as a "serious subversion of justice" which marked the death of the country's democracy.
There were concerns over the logistics and safety of carrying out an election in the midst of the worldwide coronavirus pandemic.
Who is Lazarus Chakwera ?
The opposition leader, a former cleric, heads up the opposition Malawi Congress Party (MCP).
Born in Lilongwe to a subsistence farmer, the philosophy and theology graduate has pledged to raise the national minimum wage, among other reforms.
Mr Chakwera leads a nine-party coalition, the Tonse Alliance, and had the backing of former President Joyce Banda as well Mr Chilima, who served as deputy to Mr Mutharika.