LANDI KOTAL, Pakistan A few miles from the Afghanistan border, where the barren, gray landscape of the Khyber Pass reaches its apex, a sign advises foreigners to halt.
"Prove your identity," it says. "You are entering a prohibited area."
The fierce Pashtun tribesmen of this rugged border region are famous for their hostility toward outsiders. Over the centuries, interlopers have intruded, some staying long enough to deceive themselves that they had established dominion. Their monuments - British forts, Buddhist shrines, Sikh temples - are scattered along the winding highway like sun-bleached bones.
Now Pakistan's army is the latest invader of the semiautonomous tribal areas, where Osama bin Laden and his followers are believed to be hiding.
Last week, Pakistani troops pounded suspected al-Qaeda hideouts and a training facility in the government's latest attempt to establish control over the lawless region. The army said it had killed dozens of insurgents.
Although the Federally Administered Tribal Areas lie within Pakistan, the army has been content to leave them on their own, governed only by a Pashtun code of honor. But with U.S. troops fighting Islamic militants a few miles away in Afghanistan, Pakistan is under pressure to assert itself in the tribal areas for the first time since independence in 1947.
Its efforts have yielded mixed results. It has captured more than 500 al-Qaeda members, including hundreds who fled from Afghanistan after the Taliban regime collapsed in 2001. But its recent campaigns have netted few serious terrorists, while leaving scores of civilians and soldiers dead and relations with tribal leaders in tatters.
"We're upsetting a very delicate balance that has existed for more than 50 years," said Tasneem Noorani, secretary of the Interior Ministry. "The law-enforcement agencies were not part of their culture. Now the army has had to take some action, and as a result of it, there have been some casualties."
In March, President Pervez Musharraf announced the encirclement of a "high-value target" near Wana in South Waziristan, prompting frenzied speculation about the imminent capture of bin Laden's chief lieutenant, Ayman al-Zawahiri. But after a 12-day siege, no al-Qaeda leaders were seized. Most of the 163 local tribesmen arrested were later quietly released.
Pakistan's halfhearted attempts to seal its border underscore the paradoxical nature of U.S.-Pakistan relations: While U.S. officials publicly praise their ally's efforts in the war on terror, some privately call them disappointing, even counterproductive.
"The positive spin is that over the last year, Pakistan has moved gradually to exert central government control in the tribal areas," a diplomat said. "The actual situation is that it's a mess, really. All sorts of things went wrong."
Zalmay Khalilzad, the U.S. ambassador to Afghanistan, ruffled sensibilities recently when he suggested that American soldiers might cross the border to attack terror suspects.
"We have told the Pakistani leadership that either they must solve this problem or we will have to do it for ourselves," he said in April. Last month, U.S. forces twice entered Pakistan in hot pursuit of militants, prompting another round of objections.
Pakistani officials say the Americans do not comprehend the complexity of the tribal areas or fully understand tribal resentment of Americans. But after two unsuccessful assassination attempts against Musharraf in December, there is a growing realization that it is in Pakistan's national interest to suppress the militants.
"We would like to clean up this problem for our own benefit, not just the Americans'," said Mehmood Shah, the security secretary in the tribal areas.
There is no quick way to integrate the tribal areas into Pakistan's mainstream.
The Pakistani government has invested little here. Roads, clinics and schools are scarce. Pakistani radio and television do not penetrate, so the central government's influence is weak. Voting was extended to the tribal areas only seven years ago.
Although Pakistan developed an extensive intelligence network in Afghanistan, it ignored its own tribal areas, said Javed Ashraf Qazi, retired chief of Inter-Services Intelligence, the spy agency known as ISI:
"The tribal areas were out of bounds... We were not supposed to enter. And since they had never given trouble to Pakistan, we never found the need to spy on them or to have our intelligence operating over there... This is the folly the government has now realized."
Like cowboys of the American West, Pashtuns are steeped in romantic lore. Their code is seen as a model of community self-policing, holding tribes accountable for the misdeeds of individual members. And while tribal leaders do not welcome the uninvited, they are famously hospitable to and protective of invited guests.
With few agricultural resources, Pashtuns have survived by cleverness. Many developed a knack for illicit commerce, trading in opium and weapons. "People have involved themselves traditionally in what we call 'smuggling' and they call 'trade,' " Noorani said.
Until recently, the Afghan border was a vague concept. Surveyed by British colonialists, it split Pashtun tribal areas, so local residents had citizenship in both countries and crossed freely until the Soviet invasion of Afghanistan in 1979.
As resistance to the Soviets developed, the Pakistani Pashtuns were well-suited to be quartermasters to the Afghan fighters. U.S.- and Saudi-financed weapons and supplies flowed through the tribal areas. And those who came from around the Muslim world to help the mujaheddin, including a young Saudi tycoon named Osama bin Laden, established relationships that survive today.
"A lot of people stayed since the Soviet war," said Fazal ur Rahman, a senior research fellow at the Institute of Strategic Studies in Islamabad. "These people have been living together a long time."
In the new war on terror, the Chechens, Uzbeks and Arabs who became integrated and intermarried into the tribal areas are hard to distinguish from the locals, wearing the same pakul hats and speaking the same language, Pashto.
"For three decades, they've been told these people were heroes for fighting the Soviets," said Ismail Khan, Peshawar bureau chief for Pakistan's largest English-language daily, Dawn. "Now suddenly they're terrorists, foreigners occupying Pakistan. It's hard for people here to digest this 180-degree turn."
The central government has tried to induce the tribal areas to join the war on terror by promising more development. "Roads will lower cost of goods, and they're good for humanity," said Col. Muhammad Riaz Shahid, head of the Khyber Rifles, one of the militia units guarding the frontier. "In the process, we win over their hearts."
But trust-building give-and-take with tribal elders takes time.
"The whole system is built on favors, payments in installments, and patronage," said a Peshawar journalist, Rahimullah Yusufzai. "Development could bring a change - more interaction with the rest of the world. But, you know, things move very slowly in this part of the world. It may take years."
Some tribal areas have been more accommodating than others. In the Khyber area, local leaders sided with the central government in 2001 after being promised a new road.
"The tribe set aside its own traditions and allowed Pakistan to deploy troops along the border," said Malik Darya Khan, head of the Zakhakhela subtribe. "It was for a noble cause, because what the terrorists were doing was not Islamic."
Even then, though, there were problems, he said: "Pakistan promised us development, but this development process is very slow. Some tribesmen are still very unhappy that the Pakistan army was invited in."
In the remote areas of South and North Waziristan, al-Qaeda has dug even in more tenaciously.
"Psychologically, the terrorists have power over these tribes," said Shah, the tribal security chief.
Last year, South Waziristan tribesmen were asked by the government to turn over about 100 local residents who were harboring militants near Wana. Tribal leaders, after holding a council, gave up only half.
Shah said the government felt the tribal leaders were stalling, and so, in March, they ordered the Frontier Corps militia to arrest the ringleaders. The militia met withering - and unexpected - resistance.
At that point, Pakistan called in 30,000 troops, who encircled the area. More than 50 soldiers died in the ensuing 12-day battle, and at least that many tribal fighters and civilians.
In the end, the militant leaders escaped, while the government offered an amnesty and agreed, in the future, to work through tribal leaders - essentially reinforcing the time-honored way of doing business.
Many regarded the operation as a failure. "The military's action in Waziristan has alienated the tribal people," said I.A. Rehman, director of the Human Rights Commission of Pakistan. "We have reintroduced the question into the minds of people from the tribal areas: 'Why should we join Pakistan?' "
But Maj. Gen. Shaukat Sultan Khan said the campaign in fact had expanded the government's influence and given it a new weapon in the war on terror.
"The terrorist base in Wana has been smashed," the army spokesman said. "Now the legitimacy of the government has been established in that area, where it didn't exist before. They cannot again fool us that there's nobody there. If anyone has lost credibility, it was the local elders, not the military."