Pakistan has imposed stringent new controls at a key border crossing with Afghanistan, stranding hundreds of people attempting to cross on June 2.
Afghans now need valid passports and visas to enter Pakistan at the Torkham crossing near the Khyber Pass, but many people were unaware of the changes that came into force on June 1.
Between 10,000 and 15,000 people typically use the crossing each day.
Pakistan says the new rules are aimed at stopping militants from crossing into Pakistan and staging attacks, and it will soon apply the same rules at other crossing points with Afghanistan.
Islamabad has been planning to increase border controls since the Army Public School attack that killed more than 150 people in 2014.
Its resolve was bolstered by an assault on Bacha Khan University in January. Pakistan intelligence found that two of the university attackers traveled into Pakistan through Torkham.
But while Islamabad claims that Kabul has not done enough to stop Pakistani Taliban militants living in Afghanistan from crossing the border and mounting attacks on Pakistan, Kabul has frequently had the opposite complaint: that Islamabad does little to deter Afghan Taliban members from staging attacks on their homeland from Pakistan.
Pakistan has set up walk-through gates and scanning machines to check travelers and their luggage. Their passports and visas are checked by border guards.
Pakistan says the system will soon be extended to seven main crossings between Afghanistan and Pakistan's Federally Administered Tribal Areas, as well as an eighth crossing into Balochistan Province, when funds are available.
The restrictions are expected to affect an estimated 1 million Afghan refugees in Pakistan. Most have large families on both sides and travel back and forth. They are also mostly poor and uneducated.
Afghan refugees living in Pakistan have shuttled back and forth across Torkham for nearly 40 years without being asked questions.
A woman and her daughter on the Afghan side of the border could be seen on June 2 weeping as they could not reach a sick relative in a hospital in Peshawar. They did not know the crossing had been closed.
The border station is usually packed with cargo-filled trucks and minibuses crammed with passengers. Drivers on both sides said they are nervous they will lose business.
Some travelers who regularly cross the border on foot were outraged.
"I have to cross the border every morning to go to work and return home. How can I get a visa every time?" Mohammed Yusuf, an Afghan national, told Al-Jazeera. "How can each visiting family member pay $300 for a passport?"
The long and porous border has long been a source of tension between the two countries, and the new border curbs could revive a historical dispute centered on how the border was drawn.
In the late 1800s, Mortimer Durand, a British colonial diplomat, drew the border, which Afghans say cut off a third of their territory and placed it in Pakistan, which was then part of British India.
The severed, formerly Afghan regions included the current-day Pakistani provinces of Balochistan and Khyber Pakhtunkhwa.
Some Afghans never came to terms with the arrangement, which was signed off by an Afghan king at the time.
"I blame the Afghan authorities at that time," Faridon Momand, an Afghan legislator, told Al-Jazeera. "For short-term gains, they cut one body in two, causing harm that still hurts today."
Some of Faridon's family members are prominent politicians in Pakistan and their native village is divided in two by the Durand Line.