This photo taken on February 9, 2017 shows Afghan nationals waiting to cross the border between Pakistan and Afghanistan at the Torkham border crossing in Pakistan. (Photo by AFP)

Pakistan has indefinitely shut down two border crossings with Afghanistan, after opening them briefly over the past two days.

Pakistani official Niaz Mohammad, based in the northwestern border town of Torkham, said on Thursday that the border was closed again at 9.30 p.m. on Wednesday.

“There is no clarity on when the border will be reopened,” media outlets quoted the official as saying.

He said that 24,000 Afghans had returned to Afghanistan on foot, while 700 Pakistanis returned home this week before the border was closed on Wednesday.

Pakistani authorities temporarily reopened the crossings on Tuesday and Wednesday to allow the return home of stranded citizens of both countries holding valid visas and travel documents.

Attahullah Khogyani, the government spokesman for Afghanistan’s border province of Nangarhar, said that two men, a woman and a child, were trampled to death in the resulting surge of over 20,000 Afghans passing through the crossings.

The border crossings were abruptly ordered closed last month after a series of attacks Pakistan blames on militants sheltered in Afghanistan.

Aid groups say hundreds of Afghan families have been displaced due to cross-border shelling by Pakistani troops over the past few days.

The closure chokes off a key trading route for landlocked Afghanistan. It also cuts off Pakistani traders from a steady market.

On Thursday, some 200 traders and transporters held a protest at Torkham crossing, complaining that cargo on hundreds of stranded trucks, particularly fruit and meat, was rotting.

“People have suffered billions of rupees of losses in the past three or four weeks,” said one protester, adding, “Their loaded vehicles have been standing by the road and there is no indication when the border will be opened.”

An Afghan border police personnel stands guard at the Torkham border crossing between Afghanistan and Pakistan on February 17, 2017. (Photo by AFP)

Meanwhile, an unnamed Pakistani official said the border would stay closed until the Afghan government takes action against a list of 76 “most-wanted terrorists” whose capture and handover was demanded by the Pakistani army last month.

Pakistani authorities say terrorists infiltrate from Afghanistan into Pakistan through the border crossings.

Afghanistan and Pakistan blame each other for the Taliban violence plaguing both countries.

The two neighbors have accused each other of allowing militants to shelter in the border regions and launch bloody attacks that threaten regional stability.