The Taliban are prepared to hold peace talks with the Afghan government next month straight after the Muslim holiday of Eid al-Adha, the insurgents said Thursday, provided an ongoing prisoner swap has been completed.

The conditional offer marks the first occasion a talks timeline has been floated since warring parties blew past a March 10 deadline to begin negotiations.

The development comes amid soaring violence that has threatened to derail US-backed efforts to bring Kabul and the Taliban to the negotiating table and seek an end to Afghanistan's nearly 19-year-old war.

The Taliban are "likely ... ready to begin intra-Afghan negotiations immediately after Eid in case the process of the release of the prisoners is completed," the insurgents' political spokesman Suhail Shaheen said on Twitter.

He added that the Taliban were ready to release the remaining Afghan security force prisoners in their custody, as long as Kabul freed all insurgent inmates "as per our list already delivered" to authorities.

The prisoner-exchange issue, agreed to under the auspices of a deal between the US and the Taliban, has proved a major sticking point ahead of peace talks.

The Afghan government -- which was excluded from the US-Taliban deal -- is supposed to release 5,000 Taliban fighters, while the insurgents have pledged to free 1,000 Afghan security forces in their custody.

Afghanistan's National Security Council spokesman Javid Faisal said several of the freed Taliban inmates were dangerous fighters who quickly returned to the battlefield.

"The Taliban ... must stick to their commitments of stopping the freed prisoners from going back to violence," he said on Twitter.

"Stop violence, get ready for intra-Afghan talks as soon as possible," he said soon after Shaheen's tweet.

So far, Kabul has released about 4,400 Taliban captives. The militants say they have freed 864 government inmates.

In recent months violence has soared in Afghanistan, with the Taliban carrying out near-daily attacks against security forces
In recent months violence has soared in Afghanistan, with the Taliban carrying out near-daily attacks against security forces AFP / WAKIL KOHSAR

Even amid faltering progress on the prisoner exchange, violence levels have soared across Afghanistan, with the Taliban carrying out near-daily attacks against security forces.

But it was an Afghan government air strike this week that has drawn the most scrutiny after officials said it killed eight civilians.

The strike hit a group of people gathered Wednesday in the western province of Herat to celebrate a Taliban commander's release from prison, an official told AFP.

"An air strike was carried out during the ceremony and civilians who participated were among those killed," said Ali Ahmad Faqir Yar, the district governor in the area where the strike took place, putting the toll at eight civilian dead and 16 wounded.

On their website, the Taliban said the insurgent had been released from Bagram prison outside Kabul on Tuesday.

Zalmay Khalilzad, the US special envoy to Afghanistan, said photographs and witness accounts indicated that many civilians, including children, had been killed.

"We urge all sides to contain the violence, protect civilians, and show necessary restraint as the start of intra-Afghan negotiations is so close," he said on Twitter.

The defence ministry, however, disputed both accounts and said none of those killed were civilians.

Afghan forces had carried out the strike "based on intelligence photos and videos", the ministry said.

"The defence ministry's investigation is ongoing, but initial information shows that no civilians were killed," it said.

In a separate incident in the eastern province of Nangarhar on Wednesday, at least 31 Taliban fighters were killed in clashes with security forces, the defence ministry said.

In a series of tweets, the United Nations Assistance Mission in Afghanistan warned of a "spiralling cycle of violence", and mission head Deborah Lyons called for a ceasefire over Eid festival.

The Eid al-Adha or feast of sacrifice is one of the holiest Muslim rites and marks the end of the annual hajj pilgrimage.

During a separate festival marking the end of Ramadan in May, the Taliban called a three-day ceasefire, marking only the second official truce in the war.