An Afghan refugee girl walks back to her home in a slum on the outskirts of the Pakistani capital, Islamabad, in August. She is one of an estimated 1.7 million mostly Afghan refugees in Pakistan.
Afghan refugees collect water from a water point in a slum area on the outskirts of Islamabad, in May.
Afghan refugee Hamesha Gul, 59, reads from the Quran after early-morning prayer in a mosque in an Islamabad slum in August.
Burhan Khan can't remember exactly when he fled from Afghanistan to Pakistan. He thinks it was about 30 years ago.
"Because there was war. There was killing, there was murdering, there was firing, and they wanted to kill me, and they wanted to kill my children, so I had to come here," he says.
It was the final phase of the Cold War, and CIA-armed Afghan guerrillas were fighting to drive the Soviets out of Afghanistan.
Khan and his family wound up where they are today, in a mud hovel on a patch of wasteland outside Pakistan's capital, Islamabad.
Khan is 60, though his full white beard and deeply lined face make him look a lot older. He survives by hauling vegetables in a market.
He has never returned to his home, in northern Afghanistan's Kunduz province. He feels it's still too dangerous to try. "We can't go there because if we go, we will die there, our children will be killed; everybody is still killing us there," Khan says.
Each big new conflict in Afghanistan over the past three decades has unleashed a wave of refugees, many of whom have returned home.
Yet Pakistan still has some 1.7 million refugees — mostly Afghans — on its soil. Pakistanis fear another wave will arrive because of the fallout after 2014 from the drawdown of U.S. and NATO forces.
There is widespread concern the drawdown will be followed by a civil war in Afghanistan that will spill over into Pakistan, causing more violence in an already unstable nation. Leading Pakistani analysts say that prospect has led their country's policymakers to change tactics toward its neighbor.
External And Internal Threats
Pervez Hoodbhoy, a leading Pakistani political activist and commentator, says he thinks civil war in Afghanistan is "almost a certainty" after the departure of the international troops.
He wants U.S. forces to leave Afghanistan but says their withdrawal should be gradual. Even so, Hoodbhoy is very worried about what happens next. "It's going to be ugly, bloody, and no one is looking forward to 2014, except for the Taliban," he says.
Pakistan is going through a particularly rocky period in its turbulent history. The economy is in crisis. Conflict between Pakistani government forces and homegrown Islamist insurgents, including the Pakistani Taliban, has claimed tens of thousands of lives.
Hoodbhoy believes if he's right — and there is an Afghan civil war — refugees won't be the only threat to Pakistan.
"We will see the Taliban will become much bolder," he says. "There will be a feeling among Islamist forces in this country, and not just the Taliban, that with the Americans now out of here, it is now time for an Islamic revolution in Pakistan."
Fear that they'll soon face another bout of chaos and bloodshed is preying heavily on the minds of Pakistan's rulers.
A Shift In Policy
Pakistan's military and intelligence services determine the country's Afghan policy. And some analysts see a significant shift in that policy, brought about by Pakistan's desire to avoid more instability and violence.
"I think Pakistan has learned its lesson," says Tariq Fatemi, a former Pakistani ambassador to Washington. "It recognizes that in Afghanistan peace can prevail only where there is power sharing among the various ethnic groups."
Fatemi says he has spoken to many people in key positions, who tell him "that they now recognize that these ambitious plans of wanting to determine Afghanistan's destiny was not only a failed policy, but was a policy that caused us immense harm."
That policy is linked to Pakistan's constant worry about being sandwiched between two hostile countries.
Its old enemy, India, lies to the east. So for years, Pakistan sought to influence events in Afghanistan, to the west, by supporting its majority ethnic group, the Pashtuns.
Pakistan helped the Taliban come to power in the mid-1990s. In recent years, Islamabad has often been accused of covertly supporting certain Pashtun militant groups, including the Taliban and the Haqqani network.
With its own large population of Pashtuns, Pakistan has worked on the assumption that a Pashtun-run Afghanistan would be friendly and, it hoped, compliant.
Maleeha Lodhi, also a former Pakistani ambassador to Washington, says that's all changed.
"One of the biggest mistakes that Pakistan made in the past is that it saw somehow a Pashtun solution to Afghanistan, whereas now it sees an Afghan solution to Afghanistan," Lodhi says.
She says Pakistan no longer talks about seeking a friendly government in Kabul, just a stable one.
"If any group is excluded from power then there will be trouble in Afghanistan. That is the lesson from history that Pakistan has learned," she says.
Deep Divisions Remain
But have Pakistan's policymakers really learned that lesson?
Zahid Hussain has written several books about Pakistan and Islamist militancy. He is convinced that Pakistan's military fully signed on to the new Afghan policy a while back.
"It cannot be a policy without the approval of the Pakistani military establishment," he says. "I think there is complete unanimity on that."
Pakistan's military and intelligence establishment is highly secretive, and it's hard for outsiders to know what's going on within it.
Hoodbhoy, the analyst, points to deep internal divisions.
"The army is torn from within," he says. "There is a party which is seriously at war with one part of the Taliban. On the other hand, there is a substantial group which aspires to right-wing Islamist ideology."
Still, those seeking to forge peace in Afghanistan will surely welcome Pakistan's apparent new approach.
Everyone knows, though, that it won't necessarily avert disaster. There are so many unanswered questions: What if Afghanistan's presidential elections, slated for spring 2014, end in turmoil? Will an Afghan peace process ever get off the ground?
Deep distrust prevails between Afghanistan's ethnic groups.
Back in his mud hovel, Burhan Khan, the Afghan refugee, is unsure whether there will ever be peace back home — or if he'll ever be able to return.
Everyone back home knows one another; everyone remembers who supported whom in Afghanistan's wars, he explains. And that means there are many unsettled scores.