As millions of Afghans went to the polls last weekend to elect a new president, international headlines were dominated by doom and gloom. The elections have largely been defined by the collapsed US-led peace talks with the Taliban, threats by the insurgents against anyone daring to enter a polling station, and a historically low turnout.

But scratch the surface just a bit, and there were actually some encouraging signs. Across the country, Afghan women and men braved the threat of violence to show that they want to build a democratic future for their country, free of a seemingly never-ending war.

Against expectations, the vote passed relatively peacefully. The Taliban had threatened serious violence on election day, but the expected carnage never came to pass. While there were several hundred small-scale attacks according to Afghanistan Analysts Network, the security forces appeared to have prevented any mass-casualty events. The government claimed that about 68 attacks had led to 37 civilian deaths on election day, although some media reporting put the number higher. These are, of course, grim figures that speak to the harrowing human cost of war in Afghanistan, but they do not represent an increase on the conflict’s average casualty rates.

As for the turnout, there is no denying it was disappointing. Out of 9 million registered voters, election officials estimate that only some 2.5 million showed up on polling day (a paltry 20% of registered voters) – a historic low. In 2014, roughly 7 million voted. But it is important to note that there were plenty of mitigating circumstances. Insecurity ensured that polling centers in the most war-ravaged parts of the country stayed closed.

The ongoing peace talks with the Taliban and intensifying conflict dominated the lead-up and threatened to derail the scheduled elections. It was unclear almost until election day whether the vote would even take place at all.  There was almost no civic education or “get out the vote” drive, and civil society – and the electorate at large – invested little time in the campaign. In fact, it was only clear that the vote was going ahead when US President Donald Trump abruptly pulled the plug on Taliban peace talks in early September.

Another factor driving down turnout was a general lack of enthusiasm for the options available to voters. The two leading candidates – incumbent President Ashraf Ghani and Chief Executive Abdullah Abdullah – have spent the past five years leading rival factions within the ironically named Government of National Unity. The infighting coupled with an escalating conflict and a collapsing economy have left voters cold. As one Afghan friend put it: “The low turnout was not due to the security threats, but the candidates.”

Despite – or perhaps because of – the low turnout, last weekend’s vote also appears to have been relatively clean. Past recent Afghan presidential elections, such as in 2009 and 2014, have been marred by allegations of industrial-scale fraud, leading to months-long standoffs that threatened to erupt into violence. After last year’s divisive parliamentary election, all 12 election commissioners were dismissed and nine of them jailed on corruption charges. This year, however, media and observers reported few examples of systematic fraud – a credit to the new Election Commission, and to conscientious polling workers across the country. This is particularly important in a country where faith in state institutions is arguably at an all-time low.

With foreign correspondents in Afghanistan dwindling, Afghan media outlets are increasingly filling crucial information gaps, with journalists often risking their own lives to provide quality reporting

The vote was also a credit to Afghan media, which continue to report fearlessly even as their country is becoming increasingly dangerous for journalists. With foreign correspondents in Afghanistan dwindling, Afghan media outlets are increasingly filling crucial information gaps, with journalists often risking their own lives to provide quality reporting. Election day was no different – perhaps most heartening were live television feeds of female journalists reporting from polling stations in far-off, insecure provinces.

Most important, however, was what this vote meant to Afghans themselves. Across the country, people from all walks of life defied threats to vote, asserting their belief in a better future. There were stories of people whose inked fingers were chopped off by the Taliban during the last election but came to vote again. Media showed pictures of elderly women in remote rural areas casting ballots and holding up their inked fingers. Many young people not only voted, but also volunteered as election observers.

The message was clear: This was a rejection of those who seek to use threats and violence to undermine human rights and democracy.

Despite these positives, Afghans are now again facing a period of uncertainty. The preliminary results are not due until mid-October at the earliest, while final results are not expected until November 7. There are strong signs that neither Ashraf Ghani nor Abdullah Abdullah has won a simple majority, meaning a divisive and logistically challenging run-off vote is likely. With both sides already having claimed victory and the electorate frustrated with the time it is taking to announce the result, there is a real risk of tensions escalating further.

But for now, the relative success of the elections has led to a sense of optimism, however cautious and fleeting. Afghans have suffered through decades of senseless violence and long for a return to normalcy where the conflict does not define every aspect of their lives.

The elections have shown a glimpse of what a brighter future could be – it is now up to all of us to ensure that it is not just another false dawn.