On Aug. 5, 2019, Indian President Ram Nath Kovind formally revoked Article 370 of the Indian constitution which protected Kashmir’s special status and tightened the Indian central government’s grip over the Muslim-majority region.

Pakistan has roundly and repeatedly condemned India’s move on Kashmir. Pakistani Prime Minister Imran Khan said that Pakistan would “teach India a lesson,” and promised to “fight until the end.” Put aside the fact that India likely never would have changed the status quo had it not been for decades of overt Pakistan-sponsored terrorism . Terrorism is a tactic the states use to achieve aims at a relatively low cost. In this case, the Pakistani gamble backfired, and Khan, as well as Pakistan’s Inter-Services Intelligence, have no one but themselves to blame. Lost in the Pakistani criticism of India’s actions, however, is recognition of Pakistan’s own hypocrisy. For four and a half decades before India revoked Article 370, Pakistan stripped both Gilgit-Baltistan and Azad Kashmir (as Pakistan calls the portion it occupies) of their special status.

The root of the Kashmir question rests in the 1947 partition of India. The princely state’s leaders chose to join India, a move supported by the region’s Hindus, Sikhs, Buddhists, and many of its Muslims. Other Kashmiri Muslims, however, wanted to join Pakistan. Still others would have preferred outright independence, although this was not an option offered. The nascent Pakistani state responded by invading — first with irregular Pashtun tribesmen and then more formally with the Pakistani army, eventually occupying about 30% of the region. A UN ceasefire established a line-of-control solidifying Kashmir’s division and UN Security Council Resolution 47 called for a referendum to resolve the dispute. That referendum never happened and, despite multiple pledges to resolve the problem diplomatically, successive Pakistani governments sponsored terrorist groups to strike into India and twice, in 1965 and 1999, unsuccessfully started wars after seeking military to alter the line-of-control.

Pakistan gained control of Gilgit-Baltistan, previously called the Northern Areas and part of Jammu & Kashmir in October 1947, after the new Pakistani government infiltrated irregulars into the region.

Just as Pakistan partisans today say Kashmir’s inclusion in India is illegitimate because, it claims, the Kashmiri people never accepted Maharaja Hari Singh’s decision to join India, most of the people of Gilgit-Baltistan opposed British Major W. A. Brown’s decision to have Gilgit-Baltistan join Pakistan. Pakistan completed the evisceration of Gilgit’s popular will in the then-secret Karachi Agreement of Apr. 28, 1949, wherein the Azad Kashmir government ceded complete defense and foreign affairs control over Gilgit-Baltistan to Pakistan, a move never approved by the population of Gilgit-Baltistan. The International Crisis Group — generally no friend to India and other democracies — confirmed the persisting unpopularity of the Karachi Agreement and Pakistani rule in the region.

Pakistani occupation of Gilgit-Baltistan appears illegal, even under Pakistani law. In 1992, the Azad Kashmir High Court ordered the Azad Kashmir government to assume control of Gilgit-Baltistan since it found that Gilgit-Baltistan was part of Jammu and Kashmir. Article 257 of the Pakistani constitution, meanwhile, confirmed that Jammu and Kashmir is a disputed territory which does not belong to Pakistan.

The hypocrisy continues: In 1974, Pakistan abrogated the State Subject Rule in Gilgit-Baltistan as part of the process Islamabad initiated to change demography by transferring Sunni Muslims into what had been a predominantly Shiite-dominated region. While politics hamper accurate censuses, in 1948, the Gilgit-Baltistan region was at least 85% Shiite and Ismaili Shiite; after the 1974 State Subject Rule abrogation, the region is only 50% Shiite.

The Pakistani government has in recent years sought to blunt criticism of what, in effect, is its colonial attitude toward Gilgit-Baltistan. The 2009 Gilgit-Baltistan Self-Governance Order, for example, feigned local empowerment, but real decision-making ability remains with the appointed governor rather than the chief minister or elected assembly. Likewise, while the Gilgit Baltistan Order of 2018 in theory transferred powers to the Gilgit-Baltistan Legislative Assembly, vested extraordinary powers remain with the Prime Minister of Pakistan who retains final say on all legislation and regional policies.

There can be a real and legitimate debate about Kashmir with regard to human rights and economic opportunity. The Indian government and Indian security forces are not without flaws and problems. Kashmiris themselves may debate the revocation of Article 370. What is certain, however, is first that Pakistan’s own actions and attempts at unilateralism likely forced India’s hand. Pakistani support for terrorism not only inside Kashmir but also throughout India lost Islamabad the moral high ground decades ago which is why, despite President Trump’s ego-stroking of Khan during the Pakistani leader’s recent visit, U.S.-Pakistani ties remained strained and most American officials consider Pakistan more an adversary than an ally. More seriously, however, Pakistan has little authority to complain about India’s decision to change Kashmir’s status given that Pakistan itself created the precedent when Pakistan undermined Gilgit-Baltistan autonomy and self-governance.

Michael Rubin (@Mrubin1971) is a contributor to the Washington Examiner's Beltway Confidential blog. He is a resident scholar at the American Enterprise Institute and a former Pentagon official.