Image copyright AFP Image caption Malawi Congress Party leader Lazarus Chakwera heads the opposition coalition Malawi's opposition is claiming victory in the re-run of last year's presidential election - which was held again after allegations of widespread rigging.
Official results for Tuesday's poll have not yet been declared by Malawi's electoral commission.
But state broadcaster MBC says opposition leader Lazarus Chakwera is leading with 59% of the vote.
President Peter Mutharika, who wants a second term, has 38%, it says.
A third candidate who was not regarded as a serious contender, Peter Kuwani, is said to have received less than 2% of votes.
Last year Malawi became the second African nation to annul a presidential election over irregularities, after Kenya in 2017 .
The BBC's southern Africa Correspondent Andrew Harding says it was a rare - and for many an encouraging - judicial intervention on a continent where flawed, even stolen, elections are seldom overturned.
Africa Live: Updates on this and other stories How brave judges rejected a 'second-rate election' A quick guide to Malawi Mr Chakwera's supporters are already celebrating what they believe is an historic victory - in what would be the first time in sub-Saharan Africa that a flawed election result has been over-turned, and the opposition has gone on to win power democratically.
Praise has also come from fellow southern African opposition figures.
"New life to Malawi!," said Zimbabwean opposition MDC leader Nelson Chamisa . "The Lord has given Malawi a Godly man," he added referring to Mr Chakwera's past in the clergy.
"My friend, brother and leader has just won the Malawian elections. I just got off the phone with him and celebrate his achievement," tweeted the former leader of South Africa's DA opposition party Mmusi Maimane .
An anxious wait Our correspondent says Malawi's democratic institutions are likely to come under more strain in the coming hours and days.
The country had been bitterly divided in the run-up to Tuesday's re-run, with widespread anti-government protests.
A senior figure in the governing party has now claimed the election is being stolen.
Image copyright AFP Image caption Tuesday's vote took place amid concerns about coronavirus Speaking on Tuesday after he had voted in southern Malawi, Mr Mutharika alleged there had been violence in some opposition strongholds, the Reuters news agency reports.
"It is very sad. Our secretary general has been beaten up. Those causing the violence are desperate," it quotes the president as saying.
"How then will the election be credible?" he asked.
There has been no verification of these reports.
Image copyright AFP Image caption Lazarus Chakwera (R) is challenging President Peter Mutharika (L) On casting his vote in the capital, Mr Chakwera said that he had "confidence in the electoral commission to do what is right".
"I believe that Malawians' quest for justice is actually being answered today. And I believe their rights will be respected," he added.
Whoever wins will have to heal these deep divisions as well as tackle key electoral issues such as corruption, poverty and unemployment.
Why was there a new vote? A re-run of the May 2019 election was ordered by Malawi's Constitutional Court in February after judges found widespread irregularities with the original ballot.
That election saw President Mutharika narrowly re-elected by less than 159,000 votes with a 38.6% share of the vote. Mr Chakwera came second with 35.4%.
Mr Chakwera and the candidate who came third argued that the election had not been fair.
Their complaints included allegations that vote tallying forms had been added up incorrectly and tampered with using correction fluid - known in Malawi by its brand name Tipp-Ex.
Getty Images Malawi's 13-month election
First election on 21 May 2019
Mutharika sworn in on 27 May 2019
Thousands protest on 20 June 2019, complaining of fraud
Constitutional court overturns result on 3 February 2020 and orders re-run
Court rejects Mutharika's appeal on 8 May 2020
Source: BBC Uncertainty around the result sparked months of tension and protests, which spilled over into clashes between opposition supporters and police across the country.
February's decision to annul the election led some to celebrate, but Mr Mutharika described it as a "serious subversion of justice" which marked the death of the country's democracy.
Last month, Malawi's former electoral commission chair Jane Ansah resigned following months of pressure by protesters who criticised her handling of the poll.
The new vote comes at a time of growing tension between the government and the country's courts.
There have also been concerns over the logistics and safety of carrying out an election in the midst of the worldwide coronavirus pandemic.
Who are the contenders? The president and his Democratic Progressive Party (DPP) are in an alliance with another party, the United Democratic Front (UDF).
Reuters Peter Mutharika Candidate for the Democratic Progressive Party
Born 18 July 1940
Law professor taught in Ethiopia, Tanzania and USA
Brother Bingu was Mutharika was president, died in office in 2012
Arrested in 2013 accused of plotting coup but never charged
Won 2014 election after beating incumbent Joyce Banda
Source: BBC Monitoring "If you give me another five-year term, this country will develop to the level of South Africa or Singapore, London, America or Canada," President Mutharika told a campaign rally in Lilongwe last week.
Mr Mutharika, a former law professor who taught in the US before becoming a cabinet minister, was first elected to Malawi's top office in 2014. Two years earlier his brother, Bingu wa Mutharika, died while serving as president.
He faces competition from Mr Chakwera, a former cleric who heads up the opposition Malawi Congress Party (MCP).
Born in Lilongwe to subsistence farmers, the philosophy and theology graduate has pledged to raise the national minimum wage among other changes.
AFP Lazarus Chakwera Candidate for the Tonse Alliance
Born 5 April 1955
Studied theology in Malawi, South Africa and USA
Pastor and lecturer worked at the Assemblies of God School of Theology
Authored several books on religion including Reach the Nations
Ran for president in 2014 and came third
Source: BBC Monitoring The MCP leader, who is known as "Dr Laz" to his supporters, lead the Malawi Assemblies of God church for 24 years, before retiring at the age of 58 in 2013.
His decision to go into politics surprised many - but he once said in an interview that he was asked by God to serve in another ministry.
Analysts put his success down to his pastoral ability to bring people together - and his nine-party opposition coalition, the Tonse Alliance, is proof of this.
Voting in Malawi is generally done along ethnic lines - and the political scene is fractured.
But he has the backing of former President Joyce Banda as well as the country's Vice-President, Saulos Chilima, as his running mate.
Mr Chilima - who finished third in the 2019 vote - was once an ally of President Mutharika, but has since fallen out with him.
Another big achievement for Mr Chakwera has been his rebranding of the MCP, the party of independence, which was accused of rights violations and has been out of power since 1994.
His supporters hope his negotiating skills will help if he wins high office, as he has never held a position in government although he served as leader of the opposition since 2013 and an MP for six years.