EVER since Pakistan’s third, disastrous stint of military rule ended in 2008 with the coup-maker, Pervez Musharraf, slouching off to exile in London’s Edgware Road, the generals have tried hard to be seen to be getting out of politics. Behind the scenes the army still wields immense influence. But being seen to boss around civilian governments is to be avoided.

So it is a sign of the army’s current unease that its newish chief felt he had publicly to defend the army’s “dignity and institutional pride” on April 7th. General Raheel Sharif was responding to rank-and-file concerns of “undue criticism of the institution in recent days”, the army said.

Tensions have been rising over the treatment of Mr Musharraf, a former general, who unwisely returned from self-imposed exile last year to relaunch his political career, only to face charges of high treason. Because even retired generals are thought to be untouchable, many Pakistanis did not believe that the trial would ever get off the ground. Indeed, the army seemed to come to Mr Musharraf’s rescue when he claimed a heart scare, moved into an army hospital and dodged court appearances by claiming ill health. Yet after weeks of legal wrangling the former president was indicted on March 31st.

Even then people assumed that the government would allow Mr Musharraf to slip off back into exile rather than risk the repercussions of his conviction and possible death sentence. Not so, said a government minister, Khawaja Saad Rafique, who branded Mr Musharraf a “traitor” who must face justice.

Such language infuriates the army establishment. And it heightens their worry that the prime minister, Nawaz Sharif, whom Mr Musharraf ousted in his coup in 1999, really does want the legal process to run its course. Last week the government turned down his request to leave the country to visit his ailing mother in the Gulf.

Adding to the army’s annoyance is the government’s dogged effort to negotiate a peace deal with violent Islamist revolutionaries. In late March negotiators met militants from the banned Tehreek-e-Taliban Pakistan (TTP). A ceasefire was agreed, but violence continues. In Islamabad, the capital, on April 9th more than 20 people were killed by a bomb at a vegetable market (the TTP denies involvement).

The army wants to launch an operation against militant sanctuaries in North Waziristan, a region it says must be subdued before NATO combat troops leave neighbouring Afghanistan in nine months’ time. It fears the TTP will stall for time. Next year, without the NATO presence, militants will much more easily melt into Afghanistan should the Pakistani army attack them.

In the past a strong public rebuke from an army chief would have sparked panic among politicians. But a feisty judiciary and media appear to have made even the threat of a coup unthinkable. “Nobody should expect special treatment,” says Khawaja Asif, the defence minister, who was locked up during the Musharraf coup.

Still, even those who share the view that Pakistan’s bouts of military rule are at the root of its many problems fear that Mr Sharif is being needlessly antagonistic. If, as seems likely, talks with the TTP prove fruitless, only the men in khaki will be able to deal with the militants.