Afghan men line up to cast their votes, outside a polling station during the Parliamentary election at a polling station in Kabul, Afghanistan, Saturday, Oct. 20, 2018. Tens of thousands of Afghan forces fanned out across the country as voting began Saturday in the elections that followed a campaign marred by relentless violence. (AP Photo/Rahmat Gul)
Afghan men line up to cast their votes, outside a polling station during the Parliamentary election at a polling station in Kabul, Afghanistan, Saturday, Oct. 20, 2018. Tens of thousands of Afghan forces fanned out across the country as voting began Saturday in the elections that followed a campaign marred by relentless violence. (AP Photo/Rahmat Gul) Credit: Rahmat Gul

Kabul, Afghanistan — Afghanistan’s parliamentary elections, already three years overdue, ended as chaotically as they began with even the Independent Election Commission uncertain of how many of the estimated 21,000 polling stations closed by 4 p.m. local time, the original closing time.

There were a multitude of attacks but the most serious was in a northern Kabul neighborhood where a suicide bomber blew himself up just as polling was about to end, killing three people and wounding another 20, many of them seriously, said Dr. Esa Hashemi, a physician at the nearby Afghan Hospital.

Police and Interior Ministry officials say 15 people were either killed or wounded in that attack. Among the dead are several police officers, said Najib Danish, a ministry spokesman.

Stakes were high in these elections for Afghans, who hoped to reform Parliament, challenging the dominance of warlords and the politically corrupt and replacing them with a younger, more educated generation of politicians. Likewise, for the U.S., which still is seeking an exit strategy after 17 years of a war there that has cost more than $900 billion and claimed more than 2,400 U.S. service personnel.

As the day began on Saturday, polling stations struggled with voter registration and a new biometric system aimed at stemming fraud, but that instead created enormous confusion because many of those trained on the system did not show up for work. Also, the biometric machines were received just a month before polls and there was no time to do field testing.

“The widespread reports today of confusion and incompetence in the administration of the elections … suggest that bureaucratic failures and lack of political will to prioritize organizing credible parliamentary elections may do more to delegitimize the election results than threats and violent attacks by the Taliban and Daesh,” said Andrew Wilder, vice-president of Asia Programs at the U.S. Institute of Peace, using the Arabic acronym name for the Islamic State group.

Polling was extended until 8 p.m. local time for all those polling stations that opened late, with many opening as much as five hours behind schedule. Polling stations that could not open before 1 p.m. local time will open today for voting.

Afghan President Ashraf Ghani marked his ballot at the start of voting. In a televised speech afterward, he congratulated Afghans on another election and praised the security forces, particularly the air force, for getting ballots to Afghanistan’s remotest corners.

“I thank you from the bottom of my heart,” he said, also reminding those elected that they are there to serve the people and ensure the rule of law.

The chaos surrounding the elections, however, threatens to compromise the credibility of polls which an independent monitoring group said also were marred by incidences of ballot stuffing and intimidation by armed men affiliated with candidates in 19 of the country’s 32 provinces.

North of Kabul, thousands of outraged voters blocked a road after waiting more than five hours for a polling station to open, said Mohammad Azim, the governor of Qarabagh district where the demonstration took place.