Afghanistan’s presidential polls have closed amid accusations of fraud and misconduct. Insurgent attacks aimed at disrupting voting in the country’s north and south caused dozens of casualties.

An upsurge in violence in the run-up to the elections, following the collapse of US-Taliban talks to end America’s longest war, had already rattled Afghanistan in the past weeks. Yet many voters yesterday expressed equal frustration over relentless government corruption and widespread chaos at polling stations.

Results are not expected until October 19. Candidates need more than 50 percent of the vote to be declared outright winner, or else the top two will head for a second round in November.

A deeply flawed election and contested result could drive the war-weary country into even worse chaos, it is feared. On Saturday many Afghans found incomplete voters’ lists, unworkable biometric identification systems aimed at curbing fraud, and, in some cases, hostile election workers.

The fourth presidential poll to be held since the Taliban were toppled from power could be highly important, however, with violence at record levels, and the US attempting to broker a peace deal.

The incumbent, Ashraf Ghani, has said the vote is vital to give the country’s leader a democratic mandate to preside over negotiations between Afghanistan’s rival political factions.

However, the Taliban have denounced the election as illegitimate and warned civilians that polling stations would be targeted, and have already killing dozens with attacks at a campaign rally and on a vice-presidential candidate.

In response, the authorities have deployed more than 70,000 police, troops and intelligence officials to secure polling stations and lock down major cities. More than 9 million Afghans are registered to vote, but less than half were expected to turn out. Some said they were worried about attacks, others said they saw no point in taking part in a poll that is in effect a rerun of 2014’s fraud-marred election.

The results then were so highly contested that the US stepped in to broker a “unity government” between Ghani and his main challenger, Abdullah Abdullah. After five fractious years in power, they are facing off again at the ballot box.

But with the economy crumbling, corruption rampant and security the worst in 20 years, some Afghans say they cannot support either man.

“I voted last time, but the result just made the country worse,” said Farhad Azimi, a 36-year-old electrician. “That is why I just decided not to vote this year. I am expecting more problems after the election, maybe there will be fighting, any bad thing is possible.”

One of the first reports of violence was a bomb at a mosque in Kandahar city being used as a polling station. Fifteen people were wounded, Associated Press reported. Other attacks were reported in cities including Kabul, Ghazni – in the centre of the country – and Jalalabad in the east, although the full scale of the violence may only become clear later.

Election authorities said that security issues meant they had not been able to contact 901 polling centres that had been sent ballot papers and were expected to be open – around one fifth of the national total.

There were also concerns about the operation of biometric voter verification machines that have been brought in to prevent ballot stuffing. In at least one Kabul polling station they appeared to have done more to prevent voting than fraud.

Between 7am and 11am – the first half of election hours – the machines at the Ustad Masbah high school polling station in Kabul were not working, so no one could cast a ballot.

Still there and around the country many voters waited patiently in long lines to cast their votes, convinced that even a flawed democracy was better than the alternative.

“I voted for Afghanistan,” said Karbalai Rahim Khaliqyar, 55, a furniture salesman, who thought the country needed a change of leader. “If I don’t vote, and am just a bystander, it would be wrong. We all need to do our job as Afghans, and Muslims, and select the right person.”

Additional reporting: AP and AFP