This week’s remarkable court ruling in Malawi, which annulled the 2019 presidential election and called for new polling, may hold important lessons for other societies experiencing declining trust in their leaders and political processes.

Last May, the Malawi Election Commission declared that incumbent President Peter Mutharika had won another term, bringing in 38.6% of the vote, followed by 35% for Lazarus Chakwera and 20% for Mutharika’s estranged former vice president, Saulos Chilima. But on Monday, a five-judge panel unanimously ruled that the integrity of the May 2019 election result was “seriously compromised,” placed blame squarely on the shoulders of the Malawi Election Commission, and determined that the announced result “cannot be trusted as a true reflection of the will of the voters.”

Unquestionably, Malawi’s judiciary deserves admiration and respect for its independence and professionalism, even in the face of attempts to sway judges with bribes. But the people of Malawi, one of the poorest countries in the world, are a real source of inspiration as well. Popular concern about their democracy was not a partisan affair; according to an Afrobarometer survey conducted late in 2019, 73% of Malawians assessed that the quality of their national elections had declined—and that number even included over half of those aligned with President Mutharika’s party. Only 40% of Malawians believed that the Malawi Electoral Commission is a neutral institution guided only by law, whereas 68% believed in the neutrality of the courts.

The highly-anticipated judicial decision came on the heels of months of popular protests, many focused on rejecting dodgy electoral results, but others aimed at demanding more respect for human rights from the police force, an end to corruption in government, and better service delivery from government. When the primary institutional mechanism intended to let people hold their government accountable—the electoral process—failed them, Malawians did not retreat into cynicism or decide that democratic governance had no value. Nor did they conclude that since the international community, shamefully, was fully prepared to accept dodgy election results, they might as well do the same. Instead, they organized and kept demanding changes.

The path forward remains difficult. President Mutharika has indicated that he intends to appeal the decision. New elections will be costly to organize, and there is no guarantee of a more competent, professional, and independent electoral commission next time around. The court’s ruling also introduced a degree of confusion as to whether a majority or a plurality of votes will be required to secure victory in future polls. Past embarrassments have proved insufficient to motivate international election observation missions to change their ways, particularly in the SADC region, where accommodating elites has become an ingrained habit. But the people of Malawi’s belief that government should be accountable to them, that their laws should apply to even the most powerful citizens, and that they have the capacity and responsibility to demand better in the future, is a hopeful sign for democracy in a dark time.