JALOZAI, PAKISTAN — Haleem Gul and his family shelter under U.N. tarps in the ceaseless sun and wonder when it will be over: the militancy in their tribal homeland, the occupation by Pakistani troops, the numbing days in the refugee camp.

“My greatest wish is to go home,” said Gul, a taciturn, 35-year-old shop clerk. Having waited for more than two years now, he gestured skyward with his hands and said he can only entrust his future to Allah.

Gul’s return to the scenic, mountainous Khyber tribal area that borders Afghanistan also depends a great deal on the Pakistani military — which has made little headway in three years against a relatively small concentration of Taliban-allied insurgents, raising questions about the security forces’ capacity and will to defeat them.

While the United States and NATO draw down combat troops in Afghanistan, Pakistan is still battling a fierce Taliban and al-Qaeda-allied rebellion that arose in part due to its alliance with the United States after the attacks of Sept. 11, 2001. In recent years, the Pakistan army has launched several successful operations to clear militant groups from other northwestern regions, and resettled millions of people displaced because of the fighting.

But the opposite is the case in Khyber agency: Because of the continued instability, more than 350,000 people from the Bara district, a longtime commercial hub, have fled to Peshawar, the closest relatively safe metropolis. About 61,000 refugees — including Gul, his wife and young daughter — now occupy the U.N. High Commissioner for Refugees’ Jalozai camp, southeast of Peshawar. Officials say food supplies there are running short.

In Bara, where fighting has leveled homes, shuttered hospitals and businesses and impoverished those who remained, the Pakistani Taliban influence is growing, some residents said. This is particularly worrisome because convoys carrying NATO supplies to Afghanistan wind slowly through the surrounding areas, vulnerable to attack. Gunmen on Tuesday killed a truck driver in the first such attack since Pakistan ended its blockade of NATO routes three weeks ago; the Pakistani Taliban claimed responsibility.

The hard-core militant ranks are believed to number about 500. Estimates of troop strength on the Pakistani side — mainly the paramilitary Frontier Corps, commanded by Pakistani army officers — top 5,000, but neither figure could be independently confirmed.

“Not a single village has been cleared by security forces,” said Abdul Wahid Afridi, a leader in the secular Awami National Party who is based in Khyber. “The militancy could be collapsed. All the people are asking, why can’t the army eliminate them? Why not, after three years?”

To Haseebullah Khan, 37, another refugee from Bara, the answer is simple. “They don’t want to do it,” he said. “This is beyond our thinking.”

Pakistani military officials did not respond to e-mailed questions. Foreign journalists are barred from Khyber agency and Pakistan’s seven other semiautonomous tribal areas, so it was not possible to corroborate the refugees’ statements.

Some military analysts describe what’s going on in Bara as part of a long-standing “double game,” in which Pakistan’s military establishment protects certain Taliban groups in hopes of ensuring influence in a future Afghan government after U.S. combat troops depart.

“It cannot burn bridges,” said Ayesha Siddiqa, a columnist and author of a book on the Pakistani military. “From Washington, this looks like a double game. From Islamabad’s perspective, this looks like a desire to build a constructive shield around itself when the U.S. draws down and Pakistan will deal with the consequences.”

Ejaz Haider, another writer and analyst, said the military operations in Bara have been small-bore and less effective than the major offensives elsewhere. The security situation also is complicated by a terrain that favors the militants, who can shift quickly from one area to another.

Haider disputed the notion that the military — which has lost nearly 3,500 troops fighting against the Pakistani Taliban and other radical Islamists — would back its enemies. “I don’t believe there is any official policy at any level that is supporting groups that are killing soldiers,” he said.

At Jalozai, the largest of the three UNHCR camps left in Pakistan, the Bara refugee influx hit an alarming high of 10,000 a day in mid-March. It has since ebbed, but Save the Children, UNICEF and the U.N. World Food Program have put out urgent appeals for donations.

The WFP recently had to reduce three of its camp rations — high-energy biscuits, yellow split peas and a nutritional supplement — by half, officials said. Further cuts may have to be implemented.

“We are basically running out of food,” Robin Lodge, a WFP spokesman, said as officials from the United Nations gave a tour one day this month to European diplomats, hoping to drum up financial support.

It was 115 degrees — especially dangerous for people from cooler, mountainous climes such as Bara’s. In the flat expanse of the camp, medical workers paid special attention to pregnant women — 189 of them live in the latest sections of Jalozai to open.

In one tent, mothers cradled newborns. Children in the camp are regularly screened for malnutrition, but there is not enough money to monitor that majority of refugees who live elsewhere in the Peshawar area.

Back in their tribal districts, some besieged residents have turned to drug smuggling, kidnapping or joining the Pakistani Taliban for income. The insurgents pay about $100 a month — triple what a man can earn at hard labor, said a tribal leader who spoke on the condition of anonymity for fear of reprisals.

“And for joining the militants he gets great respect,” the tribesman said.

“The militancy is not under control,” he added. “And day by day, things are going to get worse.”

Pakistani military and government officials deny the persistent U.S. argument that Pakistan tolerates and even promotes attacks by some militants to ensure a proxy role in the Afghanistan endgame.

“Let me assure you that Pakistan does not support any terrorists,” the country’s newly installed prime minister, Raja Pervez Ashraf, told reporters during a visit with Afghan President Hamid Karzai in Kabul last week. “It is not in our interest, and we cannot afford it.”

When U.S. officials raise such accusations, Islamabad points out that Pakistan has sacrificed considerable blood and treasure, including 25,000 civilian deaths. It cites the displacement of 3.5 million citizens as part of the cost of carrying out military operations.

Refugees Haleem Gul, his wife, Ishrat Bibi, and their 9-year-old daughter, Hina, are part of the collateral damage. Their loss can be seen in a picture the father painted and hung on one of the tarps that serve as walls for their hovel.

It looks at first like a cheering reminder of their home in the scenic, green reaches of Bara, an urn filled with red flowers. But it bears this inscription underneath: “Disappointment is the other name for death.”