Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today’s WorldView newsletter.

This weekend, Afghans went to the polls to elect a new parliament. It was the first vote held largely independent of foreign assistance since the Taliban fell in 2001. As Afghan President Ashraf Ghani put it, shortly after casting his ballot at a Kabul elementary school, the high turnout proved voters “have the power and will to defeat their enemies,” namely the Taliban and the Islamic State.

“Today, we proved together we will uphold democracy, casting ballots without fear,” he said.

But if Ghani seemed optimistic, his countrymen are not. “In the past 17 years of war and crisis in Afghanistan,” the New York Times wrote, “no one remembers a season quite like this one, with peril and hopelessness at every turn.” The campaign was marred by gruesome violence. Sectarian strife and political division threaten to tear the battered country apart. And few people believe Ghani can pick up the pieces.

It didn’t have to be that way. In June, Ghani announced a temporary cease-fire with the Taliban. Experts hoped that the pause, backed by NATO and the United States, would pave the way for peace talks with the fundamentalist group, which has been gaining ground in its years-long battle to recapture the country. Military analysts say as many as 100 Afghans are dying each day in skirmishes between the Taliban and security forces; they say 61 percent of Afghanistan’s districts are controlled by the Taliban.

But the cease-fire was called off just weeks later, after the Taliban staged major attacks in the cities of Kunduz and Ghazni. By the time campaigning began in earnest this fall, election-related violence was a near-daily occurrence.

As my colleague Pamela Constable wrote, “the Taliban, which had promised to disrupt the vote, claimed to have staged 164 attacks nationwide Saturday. In the days leading up to the poll, insurgents assassinated a top security official in Kandahar province, leading authorities to postpone the election there for one week at least. In other provinces, 10 candidates were killed during the campaign.”

Just this weekend, officials estimate, 78 people, including 28 members of Afghan security forces, were killed at polling places. In Kabul, there were as many as a dozen attacks, including a suicide bomber who killed 10 voters and five police officers when he detonated his explosive outside a police station. A third of all polling stations stayed closed because the government could not guarantee the safety of voters.

The violence has made the question of who wins the election almost a secondary concern. Experts largely agree that there is no peaceful future for Afghanistan without achieving a political reconciliation with the Taliban. But the group has shown no interest in moderating its stances — and its campaign of terror against Afghan democracy makes any compromise seem all but impossible.

Beyond the slim hopes for peace, there is a deep anxiety about the government’s ability to protect and lead its citizens. An Asia Foundation poll, conducted annually since 2006, found that public support for democracy and key institutions in Afghanistan is dropping. Less than half the population trusts the country’s Independent Election Commission, and confidence in members of parliament is falling.

In the run-up to this weekend’s vote, that skepticism was on full display. Fear of corruption and voter fraud was rampant, prompting the government to launch a last-minute, high-tech anti-fraud program. But on election weekend, many poll workers were unable to use the equipment meant to verify voters' identities. As a result, polling centers opened late, and lines moved slowly, though election officials say delays affected fewer than 10 percent of polling centers.

Still, about 4 million of Afghanistan’s 8.8 million registered voters turned out — a striking number when you consider the deadly risks voters faced in showing up at all. Many who came out did so because they want an opportunity to control their future. Zamir Ahmad Khaksar of Jalalabad, a city that has been targeted by repeated bombings, told the New York Times on Sunday that he had been waiting for an hour at a polling place for election workers to find his voter registration. They had yet to find it, he said, but he was undeterred: “I would come to vote even if bullets were raining in the city just to have a proper parliament.”

Others, though, offered a darker vision. There is no returning to normal in Afghanistan, they said, and their only hope is that the country’s deep dysfunction will give way to something totally new and possibly better.

“We had a fake economy, fake money and fake prosperity. Security was provided by foreigners. Our role, our input, our understanding was limited,” Mirwais Arya, an entrepreneur in Kabul, told the Times. “My sense is that the situation will get worse as that fakeness crumbles, that we will reach the edge of collapse before there is a move for the better. … But once it crumbles, we will see that underneath, the society has actually transformed.”

Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today’s WorldView newsletter.