Border clashes have erupted again between Pakistan and Afghanistan's Taliban forces, with each side accusing the other of breaking a fragile ceasefire.

Residents fled the Afghan city of Spin Boldak overnight, which lies along the 1,600-mile (2,600 km) border between the two countries.

A medical worker in the nearby city of Kandahar told BBC Pashto that four bodies had been brought to a local hospital. Four other people were wounded. Three were reportedly wounded in Pakistan.

There has been sporadic fighting between the two countries in recent months, while Afghanistan's Taliban government has also accused Pakistan of carrying out air strikes inside the country.

Both sides have confirmed they exchanged fire overnight but each blamed the other for initiating the four hours of fighting. Mosharraf Zaidi, a spokesperson for Pakistan's Prime Minister Shehbaz Sharif, accused the Taliban of 'unprovoked firing.'

The statement continued: 'An immediate, befitting & intense response has been given by our armed forces. Pakistan remains fully alert & committed to ensuring its territorial integrity & the safety of our citizens.'

Meanwhile, a Taliban spokesperson claimed that Pakistan had 'once again initiated attacks' and stated that it was 'forced to respond.'

Residents on the Afghan side of the border said the exchange of fire started at around 22:30 (18:00 GMT) on Friday.

Footage from the area depicted a large number of Afghans fleeing on foot and in vehicles. Ali Mohammed Haqmal, head of Kandahar's information department, stated that Pakistan's forces had attacked with 'light and heavy artillery,' resulting in damage to civilian homes from mortar fire.

The latest clashes come less than two months after both sides agreed to a ceasefire mediated by Qatar and Turkey, which had halted over a week of intense fighting that resulted in dozens of deaths.

The government in Islamabad has long accused Afghanistan's ruling Taliban of providing shelter to armed groups that conduct attacks in Pakistan. The Taliban government denies this claim, arguing that Pakistan is deflecting blame for its own security failures.

In the past year, the Pakistan Taliban has conducted over 600 attacks on Pakistani forces, according to data from the Armed Conflict Location & Event Data Project.

Last week, delegations from both sides met in Saudi Arabia for a fourth round of negotiations on a wider peace settlement, but did not reach an agreement. Onlookers report that both sides agreed to continue adhering to the ceasefire.