For Pakistan's military commanders, it was a brutal warning that the gains they had made against militants over the past two years risk erosion. On Christmas Day, Pakistan's first female suicide bomber killed 47 refugees near a World Food Program (WFP) distribution point in Bajaur, the northernmost of Pakistan's seven tribal areas along the Afghan border. The WFP operations were forced to shut down. On Wednesday, Bajaur was hit again, as militants carried out their 100th bombing of a school in the area.

Also this month, militants in the neighboring Mohmand tribal area, immediately south of Bajaur, mounted some of their most audacious strikes. On Christmas eve, 150 militants carried out coordinated attacks on five security checkpoints there, killing 11 Pakistani paramilitaries. A fortnight earlier, two suicide bombers hit the local administrator's office, slaying 44 Mohmand tribesmen who had formed an anti-Taliban militia. Over 100 others were wounded. (See TIME's video of the fight against the Taliban in Marjah.)

The recent surge in militants attacks has sparked concerns about the stability of those tribal areas Pakistan had long declared secure. As the government seeks to consolidate its offensives against the Pakistani Taliban in their former strongholds in the Swat Valley and South Waziristan, the country's military can ill-afford distractions elsewhere. But the violence also serves to illuminate differences between the Pakistani and US forces, with both sides complaining about a porous border while they seem to be pursuing diverging priorities.

Since launching its offensive in Bajaur two years ago, Pakistan has prematurely made a series of triumphalist statements. As far back as February 2009, Maj. Gen. Tariq Khan, at that time the head of the paramilitary Frontier Corps, said: "In the middle of next month, we should secure Bajaur." Three winters later, most of the refugees who fled the fighting remain huddled in camps outside Peshawar. The spike in violence is unlikely to lure them back any time soon. (See photos of a Pakistani refugee camp.)

Pakistani military officials insist that they have secured all but the most inaccessible parts of Bajaur. Pockets along the Afghan border elude them. As a result, says a senior military official, the militants aren't in a position to fight out in the open. However, what the insurgents do retain, the official concedes, is "this kind of capability to let an odd suicide bomber sink into the area and strike at a place of their own choosing." Meanwhile, Mohmand has never been stable. "There was never a concerted offensive there," says military analyst Ejaz Haider, "just snap actions."

Part of the problem seems to lie in the Pakistani military's approach in Bajaur. Although many analysts question the wisdom of the steamrolling methods used  razing territory as troops advanced  the military official says that the offensive could have been more intense. "The kind of force which was applied in Swat, where we have succeeded, was much more," says the official. There were low levels of public support to begin with, not helped by the government failing to follow up the military offensive with reconstruction efforts. "What one expects is that the civilian agencies of the state would take on the political settlement of the area, once it is cleared of the militants," adds the military official.

But the principal problem, Pakistan alleges, lies across the border. Says the military official, "We are not able to cross the border and knock out the militants' sanctuaries in Afghanistan's Kunar province." That reverses the U.S. complaint. In the Obama Administrations recent Afghanistan strategy review, Washington concluded that the war effort was suffering from Pakistan's failure to stanch the flow of militants across the border and eliminate their safe havens on its side. "What do you expect us to do in Bajaur and Mohmand when the source of the problem is right across the border?" asks the military official indignantly. (See how winter is helping the U.S. gain traction against the Taliban.)

Between the east bank of the Kunar river and the border, the military official charges, some of Pakistans most wanted militants have found sanctuary. "The people of Bajaur and Mohmand are told time again that Maulvi Faqir is alive, Umar Khalid is alive," the official says, in a reference to the leaders of the Pakistani Taliban in those areas, "he can reach you, he's still a force to reckon with. If this kind of threat keeps emanating from across the border, you can imagine the reaction of the people." The leader of the Swat Taliban is also suspected to be hiding in Kunar.

The official says that the U.S. presence across the border has thinned, leaving posts unmanned. But he also goes further, accusing Afghanistan of harboring the militants. "We know that Afghan intelligence is involved and the Governor of Kunar is involved," he alleges. "Its their state policy." Underscoring the enduring mistrust between Kabul and Islamabad, the two capitals ritually trade charges of official complicity in militant attacks. The Afghans deny that they support Pakistani militants.

The cross-border militant traffic, and the ensuing violence in Pakistan's tribal areas, has implications for the U.S. in Afghanistan. Until it is confident it has secured these areas, Pakistan will not move into the territory that poses the biggest threat to both sides of the border, North Waziristan, where Washington has long urged action. "Beyond Bajaur and Mohmand, Pakistan also faces challenges in parts of Khyber, Orakzai, and along the route to Kurram," says the military official, referring to other sections of the frontier with Afghanistan.

When it comes to South Waziristan, the official is happy to echo the terms used by the Obama Administration to describe its own gains in Afghanistan. "The situation in South Waziristan," says the official, "is equally fragile and reversible. One would not like to lose South Waziristan for North Waziristan." In the meantime, Washington sees no alternative but to intensify its shower of CIA-operate drone strikes into a veritable blizzard. This year, there have been over 100 such strikes in North Waziristan alone. In public, Pakistan despairs over its trampled sovereignty, and worries about a popular fallout with each report of civilian casualties. But in private, there is recognition that they are having an effect: The drones are restricting the movements and actions of the militants.