The main border crossing between Afghanistan and Pakistan reopened to pedestrians and vehicles on Friday, more than a week after it was closed following a gun battle between frontier guards.

There have been several border closures after clashes between Pakistan and Afghan forces since the Taliban returned to power in Kabul in 2021, but this one -- lasting nine days -- was one of the longest so far.

Ailing Afghans desperate to make hospital appointments in Pakistan were among the first to cross, pushed in homemade wheelchairs past checkpoints and luggage x-ray machines along roads and walkways between the frontier posts.

Shakoor Khan, 62, said he had been waiting for five days to take his daughter, who suffers from epilepsy, to hospital in Pakistan for treatment.

"These five days were like seeing her on death row," he told AFP.

"I am sick... I have a respiratory disease," said another woman, Habiba, as she waited to cross into Pakistan.

Islamabad and Kabul were in diplomatic deadlock from September 6, when border guards opened fire at the crossing -- halfway between the two capitals -- in a dispute over the construction of an Afghan outpost.

Torkham is the busiest border post for trade and people between the two nations, which share a porous 2,600-kilometre (1,600-mile) frontier that cuts through rugged mountains and valleys.

As hundreds of colourfully painted trucks loaded with products prepared to cross, traders complained that tons of perishable goods had been lost.

"Our grapes, tomatoes, cucumbers and other produce are rotting in Jalalabad market," said trader Hazrat Gul as he left Afghanistan.

"It has meant a lot of losses for traders and truck drivers. They must not involve the gates with politics, they must always keep the trade lanes open."

- Constant source of friction -

Each side blamed the other for firing the first salvo last Wednesday, souring already poor relations between Islamabad and Afghanistan's Taliban rulers.

The border -- a colonial-era demarcation that every Afghan government has disputed -- is a constant source of friction.

Pakistan has repeatedly complained that Afghanistan is failing to secure its frontier, allowing militants to cross and strike.

Afghan authorities have denied the allegations.

Officials said more than 1,300 vehicles, including trucks and trailers, were on the Pakistan side waiting to cross.

On the Afghan side, officials and residents staged a small protest earlier this week, demanding the border reopen.

Pakistan's foreign ministry said this week that "unprovoked firing by Afghan border security forces invariably emboldens the terrorist elements".

"Pakistan has continued to exercise restraint and prioritise dialogue in the face of persistent, unwarranted provocations by Afghan troops deployed along the Pakistan-Afghanistan border," said spokeswoman Mumtaz Zahra Baloch.

The Taliban government's foreign ministry said at the weekend that Pakistan's alleged attack on its border guards was "contrary to good neighbourliness".

"The closure of the gate cannot be justified under any circumstances," a statement read.