When Pakistan's military launched an offensive in the Khyber tribal region in 2008, it promised residents they would soon be free of a reign of terror imposed by Islamist militants.
But many of the thousands who fled are still too scared to return, and new refugees have been escaping in large numbers as the military again cracks down on those same militants after repeated attacks on security forces and pro-government tribes.
This is a search operation in a limited area within Khyber Agency to locate and eliminate militant hideouts, a military official told Reuters.
The situation was becoming unacceptable.
Pakistan needs a tight grip on Khyber.
One of the main supply routes for U.S.-led NATO forces in Afghanistan runs through the area, a wedge of tan-coloured mountains sandwiched between the city of Peshawar and the Afghan border.
People who moved to the Jalozai camp in the nearby town of Nowshera told Reuters about 20,000 had fled since the latest operation began on Friday. Over 200 people were killed and about 40 villages destroyed, residents who fled said.
Khyber's history, and its current troubles, highlight the complexities of trying to stabilise Pakistan.
It is one of seven ethnic Pashtun tribal districts that straddle the porous border with Afghanistan and have never come under the full control of any government -- ideal places for militancy to thrive.
The Pakistani Taliban, the biggest security threat to the U.S.-backed government, is not the main problem in Khyber.
The man causing trouble is Mangal Bagh, a former bus driver turned warlord who heads a relatively small militia called Lashkar-e-Islam, which seeks to apply sharia, or Islamic law.
Residents recalled how he slowly started to impose his austere views years ago, while the military took little notice.
People who they catch working for the government are beheaded and the deaths are announced by loudspeaker so everyone knows it is coming, said tribal elder Mir Akbar, as children in dirty plastic sandals looked on in the sprawling camp of white tents.
Tribesmen say they are forced to go to Bagh's people to settle disputes and are forced to pay taxes to them in cash, vehicles, weapons or food.
The tribes are required to either send members of the family for certain periods of time to serve with Lashkar-e-Islam. Those who cannot afford to send male members must pay so they can hire fighters in their place, said a tribesman.
A similar situation arose in Pakistan's Swat region to the northeast. Taliban militants led by Maulvi Fazlullah fought the government for years and gradually imposed his radical rule.
The Taliban eventually capitalised on a truce with the government and took control of the valley of over one million, before being driven out by an army offensive in 2009.
Fazlullah regrouped across the border in Afghanistan and is now seen as a security threat again.
At Jalozai, displaced Khyber residents believe Bagh and his fighters will also melt away in Afghanistan if he needs to.
Islamabad has come under immense pressure to crack down on militants since U.S. special forces killed al Qaeda leader Osama bin Laden in a unilateral raid in a Pakistani town in May, where he had apparently spent years.
But the army says it has its hands full fighting the Pakistani Taliban and can't possibly go after all militants at once.
So Bagh and his men -- who hang black flags on their turf -- could gain breathing space if the military is distracted elsewhere.
People like Syed Marjan remain on edge in Jalozai, originally set up in the 1980s for Afghans fleeing war in their country.
They kidnapped my brother because he is a soldier. They said they would kill him unless he quit the army, he said.
Lashkar-e-Islam (Army of Islam) has several enemies, including the Pakistani Taliban, local warlords and tribes which the government has recruited to fight militants.
But residents say it's the most dangerous player in Khyber and acted with impunity for years. Lashkar-e-Islam first raised concerns when it began making forays into the provincial capital Peshawar to impose their Taliban-style ways.
Bagh's men kidnapped people, attacked music and video shops and ordered barbers to stop shaving men's beards in line with hardline Taliban edicts.
If they think you gamble or drink, they just execute you in a public square and everyone has to watch, said Fazal Azim, 25, a labourer. They announce it in mosques.
(Additional reporting by Qasim Nauman in Islamabad; Editing by Nick Macfie)