The perennial bad boy of the Indian subcontinent, it is clear, has realised that it now needs to mend its course, denounce terrorism and shut down its jihadist factories and roll back on the seemingly endless support provided to the Masood Azhars and Hafiz Saeeds of the world. The double game Islamabad played is over, its political leadership has realised. According to Dawn, at a recent meeting, "in a blunt, orchestrated and unprecedented warning, the civilian government has informed the military leadership of a growing international isolation of Pakistan and sought consensus on several key actions by the State."

But Islamabad should have realised that its days of breeding terrorists were over the very day the Islamic State went berserk in Europe, the US and parts of the Indian subcontinent.

With almost every liberal democracy under attack from jihadists, Pakistan should have read the writing on the wall: The world would soon start abhorring terrorism in every form, and begin to isolate and punish States that patronise jihadists. But, even in the backdrop of a world wary of jihadists waging wars in the name of Islam, Pakistan's deep state continued to pursue its policy of using terrorism as a component of its statecraft and diplomacy.

File image of Pakistani prime minister Nawaz Sharif. Reuters

Pakistan continued to believe that by overtly supporting the US's 'Global War on Terror' and covertly using terrorists on its western and eastern borders, it would be able to strike a delicate balance between its regional and global inspirations, become the good cop for the West and the bad boy for the neighbours.

According to the Dawn report, Sharif has directed the military — particularly the ISI — to back off and not interfere if the government cracks down on jihadists and pursues cases against perpetrators of the 26 November, 2008 attacks on Mumbai. The government has also asked the military leadership to expedite the probe into the Pathankot attack. The new course of action — in many ways unprecedented for Pakistan — was agreed upon after the government talked about its increasing diplomatic isolation and pressure from the US, India and even China to act against the Haqqani Network, Jaish-e-Mohammad and Lashkar-e-Taiba operatives.

At the meeting, Dawn reported, Sharif's younger brother Shahbaz, chief minister of Punjab, clashed with the ISI director-general and complained that whenever action has been taken against certain groups by civilian authorities, the security establishment has worked behind the scenes to set the arrested free. Several eyewitnesses to the incredible events of Monday believe that the foreign secretary’s presentation and the Punjab chief minister's intervention were orchestrated by the prime minister to stir the military to action, leading to the decision to dispatch the ISI director-general on an inter-provincial tour.

Nevertheless, Dawn reported, "Astounded onlookers describe a stunned room that was immediately aware of the extraordinary, unprecedented nature of the exchange."

Pakistan has gone down this road several times in the past.

In the aftermath of Kargil and the attack on the Indian Parliament, the then Pakistani president Pervez Musharraf had announced that he would not allow his country to be the launchpad for terror attacks in the region. That promise — extracted out of him by the US and the threat of an Indian attack — was unfortunately forgotten in a few months. But, the recent bout of self-introspection reported by Dawn may have been induced by rapid geopolitical changes.

Apart from the emerging consensus in the world that terrorism needs a unified global response, Sharif may have also read the signs of the shift in the US stance and China's frustration with Islamabad's inability to act against terrorists lodged in Pakistan. The US is about to wind up its operations in Afghanistan, getting ready to leave governance in the hands of an increasingly anti-Pakistan government in Kabul. Once it leaves the region, the US may have no use left for Pakistan and may dump it like a rotten egg. China, on the other hand, is pumping billions of dollars into the China-Pakistan Economic Corridor.

It obviously wants Pakistan to pursue peace to ensure the investments are not wiped away.

Curiously, although Sharif is seen as a villain outside Pakistan, many in his home country consider their prime minister an India sympathiser — somebody who is soft towards the traditional rival. Within Pakistan, Nawaz is seen as a lame duck with zero impact on foreign policy and national security. As Cyril Almeida argues in Dawn, from RAW agents in Sharif's sugar mills to conspiracies of steel mill monopolies, to the relentless linking of Sharif to Narendra Modi, all of it has worked to put the Pakistani prime minister in a position where he can’t even talk about India sensibly anymore.

So, it isn't clear whether Sharif's belated introspection and realisation of the "gradual drift towards isolation" will lead to some real action against jihadists. But, it is clear that recent events have woken Pakistan's civilian leadership out of its nuclear blackmail-induced stupor to see where the country is heading. Pakistan, being Pakistan, may not listen to this belated voice of sanity and continue on its path of self-destruction, and may even soon chuck out Sharif, something Imran Khan is threatening to do post-Moharram.

But the good news is that the civilian leaders have started looking into the mirror and telling their military counterparts about the ugly self-image they see.