A YEAR ago seven terrorists wearing suicide vests rampaged through the Army Public School in the city of Peshawar in Pakistan’s north-west, killing 132 green-blazered schoolchildren and nine others. It was the bloodiest terrorist attack in Pakistan’s history. In the home of Farooq Shah Afridi, a poster-sized photograph now hangs of his 17-year-old son, Mobeen, one of the dead pupils. A state medal awarded posthumously sits next to the portrait. It helps Mr Afridi come to terms with his loss. But so too, he says, is the thought that the death of Mobeen and his schoolmates helped to change Pakistan forever.

For the horrifying attack brought about something many thought could never happen: it forced Pakistan at last to confront the Islamist militancy tearing at the country’s vitals. A confrontation long seemed unlikely. The country’s bargain with jihadists stretched back decades, with militant Islam used as a tool to influence events in Afghanistan, rile India and shape domestic politics. And when leaders wished to move against extremism, they feared a ferocious backlash. Yet, a year on, the effectiveness of Tehreek-e-Taliban, an alliance of militant groups also known as the Pakistani Taliban and which claimed responsibility for the school massacre, has been all but beaten. Attacks by militants have fallen by half this year compared with 2014.

The change is largely thanks to an army campaign, greatly intensified after the school massacre, to clear North Waziristan, a tribal agency bordering Afghanistan that had become infested with jihadis. But as well as taking the battle to the tribal areas, the army sought a series of other measures. In order to bypass a slow and easily intimidated judiciary, military courts were empowered to try civilians. The death penalty, hitherto suspended, was reintroduced with little oversight. Among a spate of recent executions ordered by the courts were four men involved in the school plot, though details of their role are sketchy.

Due process was dispensed with entirely in the case of Lashkar-e-Jhangvi (LeJ), a Sunni supremacist outfit responsible for countless deaths of Pakistani Shias. In the past the authorities have treated it with kid gloves. Yet the group has lost much of its top leadership in what the authorities call “encounters” with police but which in reality are extrajudicial executions. Although weakened, LeJ remains dangerous, killing a provincial home minister in August and two dozen shoppers in the mostly Shia town of Parachinar on December 13th.

More than anyone, the change in official attitudes towards Pakistan’s extremists is down to the army chief, General Raheel Sharif (pictured, above). He had been itching to wage a full-blown campaign against domestic militants well before the Peshawar school attack. But a public befuddled by decades of pro-jihadi propaganda was not easily won round, while a new government had squandered a year in office trying to hold peace talks with Tehreek-e-Taliban. The school massacre galvanised both public opinion and civilian politicians, and the army still ensures that the horrors of the massacre do not go to waste. For instance, an army propaganda video shows long-haired terrorists holding a village hostage before the army comes and dispatches them all. There is little talk any more of militants being errant tribesmen incensed by filthy American imperialism. In other parts of the country purveyors of extremist ideology have been challenged, with a few mullahs arrested for hate speech. (Though the head of a notorious place of worship, the Red Mosque in Islamabad, the capital, has become active again.) A number of activists belonging to Hizb-ut-Tahrir, an Islamist group dedicated to the avowedly non-violent pursuit of a caliphate uniting all Muslim nations, have been arrested in recent months. And in October the Supreme Court emphatically rejected the appeal of Mumtaz Qadri who, as a police bodyguard, murdered the governor of Punjab, Salman Taseer, in 2011. Mr Taseer had dared publicly to criticise Pakistan’s much-abused blasphemy laws. His murder turned Mr Qadri into a hero among hardline Muslims. So the court’s rejection of his appeal was a much-needed stand against religious mob-rule.

Much left to do

Yet drawing the poison from decades of state-sanctioned Islamisation will prove far harder than picking off militant leaders—not least because death squads and the casual use of capital punishment risks a backlash. Meanwhile, a measure of abiding public intolerance came on December 14th when hundreds of people protested outside a shopping complex in Lahore against the nearly unprecedented arrest of a shopkeeper for putting up a sign barring Ahmadis, a much-persecuted minority Muslim sect.

A year ago the prime minister, Nawaz Sharif, who is no relation of General Sharif’s, vowed to make no distinction between “bad” Taliban (those who wreak violence in Pakistan) and “good” ones (militants whom Pakistan has used to gain leverage in Afghanistan, a troublesome neighbour that claims tracts of Pakistani territory, or those who keep alive the territorial dispute with India over Kashmir). Yet few steps have since been taken to curb the Pakistani operations of the Afghan Taliban or its lethal ally, the Haqqani network. Pakistan has consistently argued that it cannot use force while it is trying to broker peace talks between the Afghan Taliban and Afghan government. But at a regional “Heart of Asia” summit in Islamabad last week, Pakistan promised, according to one diplomat, to take action against “irreconcilable” Taliban who refuse to participate in peace talks. Whether it will carry out the promise is another matter.

This month Pakistan also promised India that it would bring to a speedy conclusion the trial of seven men said to have been involved in terror attacks in Mumbai in 2008 carried out by Lashkar-e-Taiba (LeT), a group with training camps in Pakistani-controlled Kashmir and with deep links to Pakistan’s security agencies. The country’s broadcast regulator had already taken the surprise move of banning coverage of Jamaat-ud-Dawa and Falah-e-Insaniat Foundation, LeT fronts designated as terrorist organisations by the UN. But Pakistan has resisted more meaningful steps, such as seizing sizeable physical assets.

Pakistan is likely to proceed with caution against LeT. The outfit is widely thought of as South Asia’s most lethal terrorist group. And through Falah-e-Insaniat it runs a vast and popular nationwide welfare organisation. A year ago, for instance, it was their ambulances and volunteers that were most prominent at the many funerals held on a cold winter’s day in Peshawar.