A bomb placed under a sofa killed four Afghans including an election candidate on Wednesday, officials said, as deadly violence escalates ahead of the October 20 parliamentary ballot.

The Taliban quickly claimed responsibility for the attack, which takes the number of candidates killed so far during the campaign season to at least 10.

Abdul Jabar Qahraman had been meeting with supporters in his campaign office in the southern province of Helmand - a Taliban stronghold - when a bomb hidden under a sofa exploded, provincial governor spokesman Omar Zhwak told AFP.

Qahraman was among four people killed by the blast in the provincial capital Lashkar Gah, interior minister Wais Ahmad Barmak told reporters. Another seven were wounded and three suspects have been arrested, he added.

President Ashraf Ghani condemned the attack on Qahraman, who he had sent to Helmand in 2016 as an envoy to help defeat the Taliban. Qahraman later resigned.

And later an improvised explosive device blew up near the campaign rally of another candidate in the Logar provincial capital Pule Alam, Laraway said.

There were no casualties in either attack.

Official campaigning for the ballot ends at midnight Wednesday.

Most of the 10 candidates who have died in the lead-up to the election were murdered in targeted killings.

Qahraman was the second candidate killed in Lashkar Gah this month, after Saleh Mohammad Asikzai was among eight people killed in a suicide attack last week.

That incident came a day after the Taliban warned candidates to withdraw from the parliamentary election, which the group has vowed to attack.

The Taliban issued a fresh warning Wednesday calling on "educational workers" to stop schools being turned into polling centres and prevent teachers and students from participating as election workers.

Violence has increased ahead of the long-delayed vote, with hundreds of people killed or wounded in poll-related attacks across the country.

Preparations for the ballot have been in shambles and with days to go, organisers are still struggling to distribute voting materials to more than 5,000 polling centres.

The election for parliament's lower house is seen as a dry run for the presidential vote scheduled for April and organisers have said it would not be delayed any further.

It also is seen as a key milestone ahead of a UN meeting in Geneva in November, where Afghanistan will be under pressure to show progress on "democratic processes".

Almost nine million people have registered to vote, but observers expect far fewer to turn out due to the threat of militant attacks and expectations of widespread fraud.

More than 50,000 members of Afghanistan's already overstretched security forces are being deployed to protect polling centres on election day.