A ceasefire along the frontier between Afghanistan and Pakistan was holding on Thursday, officials on both sides said, after dozens of troops and civilians were killed in cross-border clashes.

In Spin Boldak, a focal point of recent clashes on the Afghan side, an AFP journalist saw shops reopening and residents returning to homes they had fled during the fighting.

The 48-hour ceasefire was aimed at allowing time to "find a positive solution... through constructive dialogue", according to Islamabad.

Pakistan is facing a resurgence of attacks against its security forces on its western border with Afghanistan, led by the Pakistani Taliban and its affiliates.

Around 20 civilians were killed and nearly 170 wounded on Wednesday, according to Spin Boldak's information department spokesman Mohammad Haqmal.

The UN Assistance Mission in Afghanistan (UNAMA) reported at least 18 civilians killed and more than 350 wounded in the violence.

"Our houses were bombed, a child was wounded. I heard the plane myself," Abdul Zahir, a 46-year-old resident, told AFP. "It's terrifying."

Hundreds of residents and Taliban officials attended the funeral of seven members of the same family in Spin Boldak, an AFP journalist saw.

Islamabad accuses Kabul of offering safe haven to militants who plan their frequent assaults from Afghan soil -- a charge the Taliban government denies.

RTL

People in Afghanistan transfer coffins of Pakistani security personnel in Spin Boldak, a focal point of recent clashes / © AFP

Pakistani officials on the northern and southern border with Afghanistan told AFP on Thursday that "no violence was reported overnight, and the ceasefire remains in effect".

A senior security official in Peshawar told AFP: "Additional paramilitary troops have been deployed to counter potential... militant activity that could jeopardise the ceasefire."

Shortly before the truce was announced, blasts were reported in the capital Kabul and the southern province of Kandahar province, where the Afghan Taliban's shadowy supreme leader lives.

UN rights chief Volker Turk welcomed the ceasefire and appealed to "both parties to prevent any further harm to civilians & commit to a lasting ceasefire".

- 'Precision strikes' -

The first explosions that struck Afghanistan last week, which the Taliban blamed on Islamabad, hit while Afghanistan's top diplomat was on an unprecedented visit to India -- Pakistan's eastern neighbour and rival.

Taliban authorities then launched an offensive at the border, prompting Islamabad to vow a strong response of its own.

Exchanges of fire from Saturday killed dozens of people, with renewed violence from Wednesday also causing civilian casualties, according to Kabul.

RTL

Some Afghan residents of Spin Boldak district fled their homes during the fighting / © AFP

The Taliban government officially blamed Wednesday's blasts in the Afghan capital on an explosion of an oil tanker and a generator.

However, Pakistani security sources said the military targeted an armed group with "precision strikes" in Kabul, as well as hitting Afghan Taliban bases in Kandahar.

There were blackouts overnight and into Thursday morning in some areas of Kabul, caused by electricity cables damaged in the explosions, AFP journalists in the city said.

AFP journalists saw municipal workers carrying out repairs in a Kabul neighbourhood on Thursday morning, where the road was charred and apartment windows had been blown out.

At least five people were killed and 35 wounded in Wednesday's explosions in Kabul, an Italian NGO that runs a hospital in the city said.

RTL

This month's deadly violence follows strained bilateral relations, particularly over security issues / © AFP

"We started receiving ambulances filled with wounded people, and we learned that there had been explosions a few kilometres away from our hospital," Dejan Panic, EMERGENCY's country director in Afghanistan, said in a statement.

The casualties suffered shrapnel wounds, blunt force trauma and burns, with 10 in critical condition, the NGO said.