Lazarus Chakwera has been sworn in as president of Malawi after winning an election rerun.
"Time has come for us to wake up and to make our dreams come true," Mr Chakwera said in his victory speech.
He defeated incumbent Peter Mutharika with 58.57% of the vote in Tuesday's poll.
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.
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.
What did the new president say?
"Fellow Malawians to stand before you as your president today is an honour," Mr Chakwera said in a speech after being sworn in.
He vowed to unite the country and fight poverty.
"Of what use is freedom from oppression if you and I are slaves to starvation? Or freedom from colonialism if you are a slave to tribalism?," he said.
"Time has come for us to go beyond dreaming, time has come for us to wake up, to arise from slumber, and to make our dreams come true," Mr Chakwera said.
"With your help we will restore faith in having a government that serves; not a government that rules, a government that inspires, not a government that infuriates, a government that listens, not a government that shouts but a government that fights for you and not against you," he added.
Mr Mutharika did not attend the ceremony because the law does not require the outgoing president to be present when a successor is taking over, the BBC's Peter Jegwa in Lilongwe reports.
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.