Malawi’s President Peter Mutharika has been narrowly elected to a second term in office with 38.5% of the vote.
The 78-year-old incumbent had faced strong competition in the 21 May election, including from his deputy.
The result was announced on Monday after an injunction ordered by the country’s high court was lifted.
Challenger Lazarus Chakwera, who finished in second place, had sought to delay the results because of concerns over voting irregularities.
The head of the Malawi Electoral Commission (MEC), Jane Ansah, appealed for calm ahead of the announcement.
The MEC say President Mutharika, who heads the Democratic Progressive Party (DPP), gained a narrow victory by about 159,000 votes.
Chakwera, from the Malawi Congress Party (MCP), came close behind with about 35.4% of the vote. He had also placed as runner-up five years ago.
President Mutharika’s deputy, Saulos Chilima, finished in third place – winning just over 20% of the ballot. He had earlier said his name was initially not on the electoral register when he turned up to vote.
With high levels of national poverty, the economy and corruption were key election issues.
The vote was seen as one of the most unpredictable the country had seen.
Turnout was 74% among the 6.8m residents who were registered to vote.
Malawi has been independent since 1964. This was the sixth presidential election held since single-party rule ended in 1994.
The Malawi Congress Party (MCP) sought a delay of the results over allegations of vote-rigging.
They wanted recounts in at least 10 of the country’s 28 voting districts.
In some cases, there were accusations that ballots had been physically doctored with corrective fluid.
The injunction was initially granted on Saturday after the MEC received 147 reports of irregularities.
The tampering reports caused some protests in opposition strongholds, Reuters reports.
Vice President Chilima also alleged there had been “serious anomalies” during the vote.
Despite concerns, Malawi’s high court lifted the injunction on Monday and allowed the results to be released – confirming the president’s slim victory.