Farhad Salehi, a resident of the western Herat Province, has been chasing a Pakistani visa for weeks. Like hundreds of thousands of his compatriots, he wants to escape the uncertainty brought on by the economic collapse that followed the Taliban's seizure of power last year.
He first attempted official channels, applying directly to the Pakistani Embassy in the capital, Kabul. But after being denied a visa, he took a route often used by Afghans in a similar situation: the black market, where the business of providing permits to travel or live in the neighboring Muslim country is thriving.
"A very sick patient might get a visit visa by directly applying to the embassy," Salehi told RFE/RL's Radio Azadi. "But others have to rely on the black market."
So far, his efforts have been fruitless, despite having spent $500 in bribes to middlemen. But Salehi says there are visas available to those willing to pay the price.
"People can get a monthlong visa by paying $300, a five-month visa for $500, and $700 for a yearlong visa," he claimed.
Some Afghans have said that Pakistani visas are being sold for over $1,000, a sum that is out of reach for most after the Taliban takeover destroyed livelihoods and the country's economy spiraled into an extended crisis.
Even the legal path to getting a visa can be an expensive and exhausting process of cumbersome paperwork and bureaucratic hurdles that leads some to bribe officials through go-betweens to cut the red tape.
But there is no shortage of Afghans willing to do whatever it takes to flee from their homeland following the collapse of the Western-backed Afghan government in August.
Former government workers, rights campaigners, and journalists have told Radio Azadi they face constant harassment due to their past work, and have expressed fears of Taliban persecution.
Others have said they wish to escape the Taliban's hard-line rule, which has banned women's education and work and made it impossible for musicians and artists to practice their professions.
The economic free fall -- aided by the loss of foreign aid and trade and a lingering drought -- has shuttered businesses and left scant options for alternative livelihoods. And the dire health-care situation has forced many Afghans to look abroad to Pakistan for medical treatment.
Some seek to move away for good, ideally by obtaining asylum through the UN or by applying for Western visas upon reaching Islamabad, where they have access to diplomatic missions no longer available in Afghanistan, whose Taliban government is not recognized by any country.
The growing desperation among Afghans has opened new avenues for graft. One "commission agent," as the Afghan intermediaries of the Pakistani Embassy are known on the street, told Radio Azadi that the difficulties of going through the formal process for travel documents have allowed bribery to flourish.
"The embassy doesn't accept visa applications, but we can get them by bribing embassy staff," he told Radio Azadi on condition of anonymity.
A senior official at the Pakistani Embassy in Kabul acknowledged the problem. He told RFE/RL's Radio Mashaal that graft allegations have led to the dismissal of several embassy staffers this year.
"Due to complaints of bribes during the past three months, we fired 12 embassy staff," he said, requesting anonymity because he was not authorized to discuss the issue with the media.
He said a "thorough investigation" targeted employees who were "minting money from Afghans" who sought Pakistani visas.
Getting out of Afghanistan can be difficult even for those Afghans who have contacts who can help them settle abroad. Even getting an Afghan passport can be difficult, with the Taliban frequently closing the country's lone passport office, and countries like the United States requiring face-to-face interviews for certain visas -- an impossibility unless they can reach diplomatic offices in a third country.
In a June 6 statement, the Pakistani Embassy in Kabul said that most Afghans who are denied visas had failed to fill out their applications correctly.
"Invitation letters and other details including details of their stay in Pakistan are not properly filled out," the letter said. "This is resulting in most applications being sent back for review."
On June 12, Pakistani Prime Minister Shehbaz Sharif announced that under a new visa policy for Afghans, Islamabad would issue transit visas that would allow them to enter the country legally to complete the paperwork for further international travel.
Sharif said the move was "part of our efforts to continue helping our Afghan brothers and sisters in their hour of need." He called on the international community to "also lend a helping hand to the people of Afghanistan."
Salman Sufi, an adviser to Sharif, said the transit visas would be limited to Afghans who have already been accepted for immigration elsewhere.
"Shehbaz has approved on-arrival visas for Afghan refugees who need to pass through Pakistan to reach their destination, which has approved their immigration," he tweeted.
Under the new visa policy, Islamabad will issue a 30-day transit visa within 24 hours to Afghan nationals seeking to travel to a third country after their immigration is approved.
More than 100,000 Afghans have entered Pakistan on visas obtained after the Taliban takeover 10 months ago. They are mostly educated professionals looking to resettle in another country.
Before their arrival, Islamabad was already hosting an estimated 1.3 million documented refugees. Several hundred thousand more Afghans live in the country undocumented. So far this year, the UN's International Organization for Migration (IOM) has recorded the return of some 34,000 Afghan refugees from Pakistan to Afghanistan.
Since the Soviet invasion of Afghanistan in 1979, Islamabad has become home to several million Afghan refugees, one of the world's largest refugee populations. After the demise of the previous Taliban regime, which ruled from 1996 to 2001, more than 5 million Afghans voluntarily returned to their country from Pakistan over the course of nearly two decades, according to UNHCR, the UN refugee agency.
Islamabad is not a signatory to international conventions on the rights of refugees. Its treatment of Afghan refugees during the past three decades has swung between generosity and discrimination, and Pakistan has faced widespread accusations by Afghan refugees of harassment, ill-treatment, arbitrary detentions, and forced returns to Afghanistan.