KABUL, Afghanistan - A deadly suicide bombing this week near an election rally in central Afghanistan where President Ashraf Ghani was due to speak came as a sharp reminder of the risks to a ballot set for the end of next week in the shadow of failed peace talks.
A Taliban truck bomb on Thursday killed at least 20 people and wounded 95 when it exploded near a hospital in southern Afghanistan, bringing the death toll in a wave of attacks this week to close to 100, with hundreds more injured.
Tuesday's blast, in which at least 26 died, was also just another grim moment in a deadly week for Afghanistan.
Despite the rise in bombings, presidential candidates - including Ghani - addressed large public gatherings on Wednesday and Thursday, urging people to cast their vote to defeat the Taliban agenda of circumventing the democratic process.
But the Taliban have made no secret of their aim of disrupting the election when Ghani will be bidding for a second five-year term.
"We have conveyed it to all the Afghans to stay away from the polling stations otherwise they would be responsible for their losses," said a Taliban commander in southern Helmand province, speaking on condition of anonymity.
After months of uncertainty while US diplomats sought to hammer out an agreement with the Taliban over withdrawing thousands of troops from Afghanistan, the twice-delayed election is now expected to go ahead on Sept. 28.
Senior officials in Kabul said over 140,000 Afghan soldiers and police will be deployed to protect 28,000 polling stations and to facilitate the process that will cost $90 million to the state exchequer and almost $60 million to foreign donors.
While they lasted, the talks overshadowed the election. Many Western diplomats believed they could disrupt efforts to reach an accord with the Taliban, who had always opposed holding the vote.
But US President Donald Trump's abrupt decision to cancel a planned meeting with Taliban leaders at his Camp David retreat changed all that.
"The US ability to focus on Afghan presidential elections has been minimal as they were obsessed with holding talks with the Taliban," said a Western diplomat, who has been closely tracking political developments in Afghanistan.
"But now that the peace talks have been derailed, elections are back on the agenda," he said, speaking on condition of anonymity due to the sensitivity of the matter.
As well as Ghani, a crowded field of 18 candidates includes long-term rival Abdullah Abdullah, now serving as the country's Chief Executive as a legacy of the bitterly disputed 2014 election.
Marred by accusations of massive fraud on both sides, the 2014 vote left no clear winner, obliging the United States to step in and broker a deal that saw Ghani and Abdullah Abdullah form an unwieldy national unity government.
Also on the ballot this time around is Gulbuddin Hekmatyar, a former warlord whose fighters are accused of killing thousands in Kabul during the 1990s civil war.
LEGITIMACY, TURNOUT CONCERNS
Some 9.6 million voters have registered, in a country with a population of about 32 million.
Though election officials say preparations are well in hand, security worries could lead many to stay at home, potentially undermining the legitimacy of the eventual winner if turnout is too low.
A pre-poll survey by the Transparent Election Foundation of Afghanistan, an electoral watchdog, pointed towards a potential victory for Ghani with Abdullah coming second in the race.
But the reliability of polling in Afghanistan remains highly uncertain, and the survey itself found nearly 56% of respondents said they were not likely to vote.
Chaotic parliamentary elections last year added to disillusionment with a political system already tarnished by the 2014 presidential election.