Jalozai refugee camp is once again packed with destitute people.

The camp has housed waves of Afghan refugees since the years of Soviet occupation. Last year, the Pakistani authorities closed the camp, ordering its inhabitants — some of whom had lived there for decades — to either return to Afghanistan or to relocate to other settlements in Pakistan. Dwellings in the camp were demolished, and an era apparently ended.

Now, as the camp refills, this time with Pakistani refugees fleeing the conflict in Swat, another tragic era begins. Last month, the Pakistani parliament passed a regulation allowing the Taliban to administer its own form of Sharia law in the areas under its control, in return for a ceasefire. However, the Taliban were emboldened rather than constrained by this attempted settlement and expanded their operations ever closer to Islamabad.

For years, the Pakistani military has used these militants as its proxies in maintaining its influence inside Afghanistan and in the seemingly never-ending confrontations with India. Pakistan has been positioned as a valuable ally in the “war on terror” (and has received lavish amounts of US aid accordingly), but its political and military establishment has played both sides, collaborating with the same forces that it was supposedly confronting.

Now under pressure both from spiralling numbers of terrorist attacks within Pakistan and from international demands to take substantial measures to combat terrorism, the Pakistani military has entered into a full-scale conflict with its former proxies. The Pakistani Prime Minister has declared that the Swat operation is a struggle for the nation’s very survival.

Watching the new reports of hundreds of thousands of internally displaced people (some of them Afghan refugees who have now been displaced yet again) seeking shelter in Jalozai, I recall visiting the camp in 2000 and 2001, to interview its previous inhabitants.

I remember the stories of Taliban atrocities, the mourning for lost farms and gardens full of grapes. I remember the ubiquitous sound of children coughing. I remember the brick kilns in the area, where many of the refugees, including young children, worked as bonded labourers. I remember the boy who spoke in a tone of dizzied fantasy of one day having “all the milk he could drink”.

And I remember meeting Maryam Marao, back in Peshawar. Maryam was an Afghan village woman whose daughter had been evacuated to Pakistan for medical treatment after she was injured when the village of Karam was hit by an American air-strike, during the weeks after 9/11. Maryam heard the blast, in the middle of the night.

“We thought it was an earthquake. We could see it from our village. Everyone rushed to Karam. Five in my daughter’s house were killed. Two children, two young women, and one old man … The Americans should know they acted wrongly. They have killed a lot of very poor people. In every home in Karam, there are at least one or two dead.”

Today, many innocent people are again being killed, maimed, and driven from their homes. Pakistan’s military establishment has benefited for decades from Pakistan’s position as a “frontline state”, first in the war on communism, then in the war on terror.

Now the frontline has come home and the military — with much talk from Washington about how Pakistan is illustrating (at last) its seriousness in tackling Taliban jihadists — has turned against its own citizens the firepower that it has accumulated over years of US largesse. A military that has always envisaged its battlefield as a confrontation with the Indian military is now attempting to fight a counterinsurgency on its own territory, with its own civilians in the crossfire.

Pakistan’s military budget always took precedence over spending on health and education. As government services withered away, Islamist movements moved in to fill the gap, winning hearts and minds in the process. Those same movements will be mobilizing to provide services to the displaced refugees from Swat (as of course are the various international agencies — but demand seems likely to outstrip supply) and to tap into their resentment against the forces that drove them from their homes. Yes, the refugees may resent the Taliban, but they despise being conscripted as “collateral damage” by an army supposed to be protecting them from the Taliban.

The crisis in Pakistan is the result of decades of short-sightedness and opportunism — by successive Pakistani military and civilian governments, by one US administration after another. There are no easy solutions. But killing an unknown number of civilians and displacing entire populations is no solution at all.