Malawians queued up to vote on Tuesday in a re-run of a discredited poll that has become a test case for the ability of African courts to tackle vote fraud and restrain presidential power.

Malawi’s judiciary infuriated President Peter Mutharika, in power since 2014, when it overturned his narrow victory in February over “systematic and grave” irregularities.

His disputed win also sparked popular anger leading to months of anti-government protests, a rare sight in Malawi.

Last week hundreds of lawyers also protested against interferance with the judiciary when Mutharika tried to retire Chief Justice Andrew Nyirenda, forcing the president to back down.

The supreme court upheld the decision last month, which Mutharika, 79, called a “coup” in a campaign rally on Saturday in the northern district of Rumphi.

“I’m glad to vote again. This I pray, that my vote will count,” said Bernado Simbi, 36, a domestic security guard after voting for President Mutharika in a school near Chileka Airport, north of the commercial capital Blantyre.

The judiciary’s ruling echoed one by a Kenyan court in 2017, which cancelled President Uhuru Kenyatta’s election win.

Both were remarkable on a continent in which judges often serve as a rubber stamp to executive power.

The vote looks too close to call.

Malawi has since ditched its “first-past-the-post” system so the winner has to get more than 50%.

In the May 2019 poll, Mutharika got 38.57%, 3 percentage points more than opposition leader Lazarus Chakwera, and less than 10 points ahead of a third candidate, Deputy President Saulos Chilima.

The 47-year-old Chilima has now backed Chakwera, 64, which would give them a majority if they can combine their previous votes.