Malawi's opposition leader Lazarus Chakwera on Friday rejected the result of last week's presidential election, saying he had launched a court battle to have the vote annulled on the grounds of fraud.
Chakwera lost the election by just 159,000 votes to incumbent Peter Mutharika, who was hurriedly sworn into office the day after the delayed result was issued on Monday.
"I reject the Malawi Electoral Commission's fraudulent presidential results," Chakwera said in a statement.
He announced that he was filing a high court petition to have the election declared void.
"What we have witnessed in front of our very eyes is not an election, but daylight robbery, a crime against our decency as a people and our democracy as a nation."
Chakwera's Malawi Congress Party (MCP) last weekend obtained a brief court injunction to halt the release of the results, claiming "very glaring irregularities".
The party said that results sheets were covered in correction fluid and some sheets from polling stations far apart bore the same handwriting.
But the injunction was lifted on Monday and Mutharika was declared the winner hours later.
At his swearing-in at a sports stadium in Malawi's commercial capital Blantyre on Tuesday, Mutharika urged opposition parties to accept the outcome, saying "they have to accept that there can only be one winner."
Mutharika dismissed any doubts over the vote, saying international observers had deemed the May 21 election "peaceful, free and fair." He will be inaugurated later Friday at the same stadium in Blantyre.
After the ceremony, police used teargas to disperse Chakwera supporters who gathered outside the MCP headquarters in Lilongwe, the capital.
Mutharika, leader of the ruling Democratic Progressive Party (DPP), won the presidential election with 38.57 percent of the vote, against Chakwera on 35.41 percent. Turnout was 74 percent of 6.8 million registered voters.
Malawi has a "winner-takes-all" system, and in 2014 Mutharika also narrowly beat Chakwera, a former evangelist.
Mutharika came to power vowing to tackle corruption after the "Cashgate" scandal a year earlier revealed massive looting from state coffers.
But he has faced corruption allegations himself.
Last November, he was forced to return a $200,000 (180,000-euro) donation from a businessman facing corruption charges in a $3-million contract to supply food to the Malawi police.
Third-placed presidential contender Saulos Chilima has also alleged "serious anomalies" in this year's poll.
Chilima, on 20.24 percent, was a member of the ruling party but quit last year to form the youth-focused United Transformation Movement while staying on as vice president.
Under Malawi law, the president cannot fire the vice president.
The DPP also won the parliamentary election held on the same day.
Malawi won independence from colonial ruler Britain in 1964, and was then ruled by Hastings Banda as a one-party state until the first multi-party elections in 1994.
The country, which has a population of 18 million people, has one million adults living with HIV -- one of the highest HIV prevalence rates in the world.