At least 39 people killed and 90 wounded in a suicide attack carried out by the Taliban in the southern city of Qalat.

The death toll in a Taliban suicide attack near a hospital in southern Zabul province has gone up to 39, Afghan officials said on Friday.

At least 95 others have been wounded in the car bomb explosion that the armed group said targeted a nearby government intelligence department building in Qalat, the capital of Zabul province.

A senior defence ministry official in Kabul said the fighters wanted to target a training base for the country’s powerful security agency the National Directorate of Security (NDS), but parked the explosives-laden vehicle outside a hospital gate nearby.

Residents, many of whom had come to see their sick family members, used shawls and blankets to carry the wounded inside the destroyed hospital building, while authorities scrambled to take the worst of the wounded to hospitals in nearby Kandahar.

Haji Atta Jan Haqbayan, a member of the provincial council in Qalat, said 20 bodies and 95 wounded had been evacuated from the blast site.

Haqbayan said the wall of the NDS building was damaged. He couldn’t say whether any personnel were among the casualties.

“The number of casualties may rise as rescue teams and people are still searching the bodies under the rubble,” he said.

Several women, children, health workers and patients in the hospital were critically injured the blast.

On Wednesday, at least 48 people were killed in the Afghan capital Kabul in two separate attacks, one of which was aimed at a campaign rally of President Ashraf Ghani.

The Taliban has warned in recent days that its fighters will intensify their campaign against the Afghan government and foreign forces to dissuade people from voting in the September 28 poll. President Ghani is running for a second five-year term.

After months of peace talks in the Qatari capital, Doha, US President Donald Trump last week abruptly called off the talks with the Taliban following the killing of an American marine in a suicide attack.

The US president, who is eager to end US involvement in the 18-year-old Afghan war, was open to withdrawing thousands of American troops from Afghanistan in exchange for security guarantees from the armed group.

The talks, which did not include the Afghan government, were intended as a prelude to wider peace negotiations.