Malawi’s constitutional court on Monday annulled last year’s controversial election, which saw President Peter Mutharika narrowly re-elected.
The judge found there had been widespread irregularities in the 21 May vote.
This is the first election to be legally challenged since Malawi’s independence in 1964. A new vote will take place within 151 days.
There have been regular anti-government protests since the election.
The court ruled that Mr Mutharika will stay in power until a new election takes place.
President Peter Mutharika won a second term in May with 38.6% of the vote.
But opposition candidates Lazarus Chakwera, who came second, and Saulos Chilima, who finished third, went to court to argue that the election was not fair.
They said the way the election was conducted was full of irregularities.
The judges, who arrived in court in the capital, Lilongwe, under military escort, upheld the complaint yesterday.
According to the official results, Mr Chakwera, who claims he won the election, garnered 35.4% of the vote as the flag bearer for the Malawi Congress Party.
Mr Chilima, a former ally of the president, got 20.2%. He was the candidate for the UTM.
There is a high level of anxiety in the country following months of tense clashes between the police and opposition supporters.
Many schools were closed and some public transport had been suspended ahead of Monday’s court decision.
In court, lawyers for the losing candidates said that correction fluid – known by the brand name Tipp-Ex – had been used on some of the tallying forms sent in by polling stations.
The changes were made after they had been signed by party agents, they said.
The lawyer further alleges that there were irregularities at the polling centres where the votes were cast.
The lawyers also said that in some cases polling officials sent in the wrong copy of the results sheet to the main tallying centre.
They also found some mathematical errors in a small number of cases.
Though in each case there were not a huge number of errors, the lawyers said that the evidence pointed to a flawed process.
The Malawi Electoral Commission (MEC) defended its handling of the vote as being in keeping with the law.
It said that on the few forms where correction fluid had been found, it had not been used to change a result, but to alter procedural information that had been incorrectly entered.
The commission said it had not supplied the Tipp-Ex.
The MEC’s lawyers also argued that while the wrong copy of the results sheet had been submitted in some cases, that copy had been signed off by party agents and the tally itself was correct.
Outside the court proceedings, backers of Mr Mutharika’s Democratic Progressive Party often mentioned reports of international observers, which were largely favourable, as evidence that he won the vote fairly.