A roadside bomb in Afghanistan killed at least 35 people travelling on a bus and left 27 injured, officials said.

Security has been deteriorating across Afghanistan this year, with the Taliban and so-called Islamic State fighters mounting near-daily attacks on Afghan forces, government employees and civilians.

The blast on the main road linking the provincial capitals of Herat and Kandahar happened in the Ab Khorma area of Farah province, said provincial police spokesman Mohibullah Mohib.

"The bomb was freshly planted by the Taliban insurgents to target Afghan and foreign security forces," he said, adding most of the dead or injured were women and children.

Farah is on the border of Iran.

No group has said if they carried out the attack.

A Taliban official denied responsibility and said their fighters were not responsible for planting landmines in the area.

"The blast has not been conducted by the Taliban, we are investigating the incident," said spokesman Zabihullah Mujahid.

The blast comes ahead of the resumption of peace talks between US officials and Taliban representatives, who are hoping to strike a deal on a timetable for the withdrawal of foreign forces in exchange for security guarantees by the Taliban.

But despite the talks, violence has been relentless.

Government and aid officials say the number of people being killed and maimed is rising because of new explosives planted by the Taliban, who now control more territory than at any point since their ouster nearly 18 years ago.

According to the United Nations Mine Action Service, more than 1,415 civilians were killed or injured by landmines and leftover ordnance in Afghanistan last year.