Will Pakistan finally buckle? After a week that has witnessed some of the boldest and deadliest militant attacks against the Pakistani state and the headquarters of its most potent institution, the army, the question is asked increasingly widely. The short answer is no. But the country must brace itself for many more months, if not years, of traumatic conflict, especially as the army launches a major offensive in South Waziristan. This will deepen the conditions of chronic insecurity and political dysfunctionality to which its people have long been accustomed.

This is not to minimise the impact of the latest strikes that have convulsed Lahore, Rawalpindi, Peshawar and Kohat, or to play down the appalling loss of lives resulting from the attacks. Both have left the country in a state of shock not dissimilar to that which followed the terrorist attack on the Marriott Hotel in Islamabad in September 2008. Many had hoped that the Marriott attack would finally bring the country together and help to forge a real national consensus to tackle militancy. Those expectations have long since disappeared.

Yet there were initially some grounds for optimism. The newly elected government with cross-party support that took power in February 2008 boldly declared that it would "take ownership" of the controversial "war on terror" to defend Pakistan. A climate of political reconciliation between President Asif Ali Zardari and his erstwhile foe, former prime minister Nawaz Sharif, reinforced the mood of optimism when both sides also agreed to form a coalition government.

Download the new Independent Premium app Sharing the full story, not just the headlines

The military, too, seemed to have turned a page. The new army chief, General Ashfaq Kiyani, sent out strong signals that he intended to refrain from politics and keep his men focused squarely on military matters. Although tensions between the military and ministers were never far from the surface, they were judged to be mere teething problems.

By the time the army launched its ferocious military operation against militant strongholds in Swat in May this year – with endorsement from the government, political parties and the public at large – many assumed Pakistan had turned the corner and that state and society were finally in synch. And with the US ever ready to oblige with drone strikes, military success against the Taliban appeared to be a foregone conclusion. Confidence was further boosted after a US missile in August successfully targeted Pakistan's most wanted militant leader, Baitullah Mehsud.

His death was claimed as heralding the emergence of a real national consensus against militancy and the imminent demise of the Taliban. Neither, as recent events have demonstrated, was at all warranted. Signs of disarray were already in evidence. The first warnings were sounded in August 2008 after Sharif's party, the Pakistan Muslim League, withdrew from the ruling coalition headed by President Zardari's Pakistan People's Party. At issue was not only the reinstatement of the former chief justice, but also important constitutional amendments that would restrict the extraordinary powers of the president – a measure Zardari is as yet unwilling seriously to countenance. The mistrust generated by this issue, many now fear, has irreversibly damaged the prospects of co-operation between the two parties.

More ominously still have been signs of growing disaffection in the army over Zardari's leadership. While it is no secret that the military has always harboured a deep dislike of the People's Party, it has now taken umbrage at Zardari's attempts in recent months to encourage dialogue with India – an area over which the army is used to exercising its prerogative.

But it is Zardari's efforts to call on externally borrowed power from the US to rein in the military that has most infuriated the army's high command. In the months leading up to the enactment of the enhanced partnership with Pakistan (the so-called Kerry-Lugar bill), the government had worked closely with US lawmakers to ensure that the interests of Pakistan's civil society were not made subservient to those of the military.

By early September it was clear that the military was set to challenge these moves and step into the political fray. In a meeting last week, senior corps commanders expressed "serious concerns" over the bill. Reports indicated, however, that the army had taken grave exception to provisions of the bill calling for civilian oversight of the military and the defence budget. Differences have since been papered over by an "explanatory note" attached to the bill designed to reassure the military. But expectations of a smooth working relationship between the two sides are in question.

Though the militants were dealt a severe blow by the loss of Baitullah Mehsud, they have regrouped under his successor, Hakeemullah Mehsud. They have also shown themselves to be adept at extending their reach and forging a nexus that now involves Islamic militants from Punjab with close links to al-Qa'ida.

While larger numbers of Pakistanis may well stand opposed to militancy, popular ambivalence over the state's relation to Islam continues to thwart the prospects of translating this opposition into a coherent strategy to fight the militants. And with the militants in no doubt about what they stand for, it is now more urgent than ever for government and society to open up an honest debate about what precisely Pakistan stands for.

Farzana Shaikh is an associate fellow of Chatham House and author of Making Sense of Pakistan