IT IS a measure of how inured Pakistanis have become to violence that it takes an especially cruel attack to provoke much debate. This week saw two. In the first, on November 2nd, a suicide bomber killed at least 60 people, mostly Pakistani tourists leaving a ceremony performed by soldiers on the border with India. He struck in a car park near the main arena.

Given the location, Indians asked if his intention had been a cross-border attack. More likely the militants—three rival groups claimed responsibility—wanted a target in Punjab, home to much of Pakistan’s political and military elites. It was the first big terrorist strike since the army began operations against militants in North Waziristan in June. Many are braced for more attacks.

Elsewhere in Punjab came a smaller, but also horrific, assault. A mob in Kot Radha Kishan, a town south of Lahore, lynched an indebted Christian couple on November 4th, then burned their bodies, having accused them of blasphemy. Claiming outrage can be a pretext by Sunni extremists to grab property or settle other scores with members of minority religious groups. Lawlessness and religious bigotry are becoming frighteningly common.

Both attacks raise doubts about the ability of the prime minister, Nawaz Sharif, to rule a stable Pakistan. He swept to office with a big mandate, winning 126 of 272 contested seats in parliament in May 2013, making him the most powerful civilian leader for decades. Now he is diminished. Even close supporters fret that his main achievement will be the modest one of keeping himself in the job.

Three problems weigh him down. First, failure on economic and social matters. Inflation, electricity brownouts and the absence of free-market reforms mean incomes are hardly rising and growth is elusive. A wealthy ex-backer says he is disillusioned by Mr Sharif’s incompetence as a manager. The prime minister is prone to wasteful populism: the dishing out of laptops and a part-built “metro bus” project linking Islamabad and Rawalpindi. Polio experts condemn his government’s feeble efforts against the disease given that Pakistan is home to four-fifths of all polio cases.

A second difficulty is India. Mr Sharif made better relations a priority, hoping that trade and co-operation would boost the economy. Polls show three-quarters of voters agree. Better ties would weaken the army’s claim that India is an existential threat, an argument long misused to justify excessive military spending and army control of foreign and security policies.

Mr Sharif’s bad luck is that his Indian counterpart will not co-operate. Narendra Modi, India’s nationalist prime minister, judges that his own public wants a muscular policy towards Pakistan. He scrapped peace talks in August and gave the Indian army a freer hand on the disputed border in Jammu and Kashmir. That led to the worst violence in a decade. Matters might ease after Mr Modi’s Bharatiya Janata Party has contested assembly elections in Jammu and Kashmir in December. Otherwise Mr Sharif’s olive branch will remain spurned.

Third, Mr Sharif has been hurt by months of protests led by Imran Khan, a demagogic ex-cricketer. These had fallen quiet, but Mr Khan pledges a big march on November 30th in Islamabad. He wants to force Mr Sharif out in favour of new elections or rule either by army-backed technocrats, or himself. Though Mr Sharif should hang on—most in parliament support him and the army looks unready to suspend democracy—Mr Khan is a distraction.

It is not that Mr Khan is widely popular. Polls suggest that 18% of voters back him—the same share as he got in the 2013 election. He excites young supporters. But his national appeal is waning. A year ago many who backed Mr Sharif would have picked Mr Khan as a second choice, but no longer. He is charismatic, but shows little capacity for compromise, essential for influence in a parliamentary system.

Nonetheless Mr Khan weakens his rival, especially in dealing with the army. Early in office, says one person close to the prime minister, Mr Sharif would not consult the army on any policy. As recently as May, say foreign-policy advisers, Mr Sharif decided alone that he would attend Mr Modi’s inauguration. And Mr Sharif insisted on prosecuting Pervez Musharraf, a former dictator on trial for treason.

Such dominance is gone. “The army has gained as Nawaz is weaker” sums up Hasan Askari-Rizvi, a security analyst in Lahore. And he may get weaker still when the special court trying Mr Musharraf rules, on November 21st, whether other defendants—senior army men—should also be tried. If it does, the “army will hit the roof”, says a political commentator.

Can Mr Sharif avoid an open rift with the army? He insists the trial will go ahead and resists giving up on running foreign and security policies—though he must now negotiate on these with the army’s leaders. Yet with both the court hearing and Mr Khan’s new protests due within weeks, November will be a trying month. Mere survival will be an achievement.