Men arrive for Friday prayers at an Islamabad mosque affiliated with Jamaat-ud-Dawa days after it was banned.Aamir Qureshi / AFP / Getty

ISLAMABAD—The al-Quba mosque and seminary was, until recently, a hive of activity. The sprawling complex, which sits in a quiet neighborhood of the Pakistani capital, is a center of religious and ideological indoctrination for those wanting to take up arms against Indian forces in Kashmir.

Now, however, the entrance to the seminary is locked. Two uniformed police officers, seated in a black pickup truck and reading newspapers, are stationed outside. The roadside, where there would normally be a gaggle of students, lies empty.

Al-Quba is home to the offices of Jamaat-ud-Dawa, ostensibly a charitable organization that provides humanitarian relief and basic medical care across Pakistan, but also a group designated by the United Nations Security Council as a front for the Lashkar-e-Taiba (LeT) militant group. Its closure is a test of whether Pakistan, which has long pledged to crack down on terrorist organizations using its territory to launch attacks on India, will finally follow through on those promises.

The question is one that strikes at the heart of how power is distributed in Pakistan; of whether an elected civilian leader can exert control over the country’s powerful military; of whether Pakistan is truly willing to give up support for armed groups that it has used as proxies for decades; and of whether the country—which has long frustrated successive U.S. governments, likely none more so than Donald Trump’s administration—is truly changing its foreign-policy and security stances beyond a focus on neighboring India.

The latest move to close al-Quba and 181 other facilities came after tensions between India and Pakistan surged following a suicide bombing last month against an Indian paramilitary convoy, which killed 40 soldiers. In a video released after the blast, the attacker, a 20-year-old resident of Indian-administered Kashmir, swore allegiance to Jaish-e-Mohammed (JeM), a Pakistan-based militant group that has carried out dozens of high-profile attacks against Indian security forces in Kashmir and elsewhere. India accused Pakistan’s Inter-Services Intelligence agency of “controlling” the suicide bomber, a charge Pakistan has vehemently denied. Still, since the attack on the convoy, the two countries have bombed each other’s territory, with at least one Indian fighter jet having been shot down by Pakistani forces.

The latest crackdown by Islamabad, coupled with the return of the pilot of the downed Indian plane, has helped lower those tensions. But New Delhi has in the past accused Islamabad of meting out cosmetic punishment against groups such as JeM and LeT, arresting top leaders only to release them and quietly reopen their seminaries months later.

Is this time, with a new government under first-time Prime Minister Imran Khan, any different?

Pakistan previously took on the Tehrik-i-Taliban Pakistan (TTP) and its allies—which have carried out suicide bombings and other attacks since 2007 in an effort to impose a strict interpretation of Islamic law on the country—in a series of military operations. The latest offensive, which began in 2014, resulted in thousands of claimed TTP casualties and the displacement of the group from Pakistani territory to neighboring Afghanistan, with an accompanying drop in violence. But while Pakistan’s military insists that it does not discern between militant groups, India-centric outfits such as JeM and LeT were largely spared during those actions.

JeM and LeT—the latter of which is blamed for the 2008 Mumbai attacks that killed more than 160 people—have both been banned under Pakistani law for years, but their charitable and educational arms work openly and with impunity here. Both groups are subject to UN sanctions, with the LeT founder and chief, Hafiz Muhammad Saeed, also carrying a $10 million U.S. bounty on his head. Islamabad says it has attempted to apply sanctions against the groups, but that because the individuals involved have never been convicted by a Pakistani court, the asset freezes are usually reversed on appeal by the judicial system.

Officials insist that they are serious about taking action after the latest crisis. Last week, the government passed a new bureaucratic regulation authorizing the application of UN sanctions on Pakistan-based militant groups (though this new order remains subject to judicial appeal). LeT offices in the eastern cities of Lahore and Muridke have also been shut down. And the authorities have detained at least 44 people, including the son and brother of Masood Azhar, the JeM chief, and have sealed scores of JeM properties across the country. Azhar himself remains a free man, but Fawad Chaudhry, Pakistan’s information minister, told me that the government is considering whether to allow Azhar to be listed on a UN sanctions list, a long-standing demand of India that has been consistently blocked by Pakistan’s ally China.

“The steps we have taken have never been taken before,” Chaudhry said. “These steps are actually big.”

The government has outlined a three-pronged approach to dealing with these militant groups: It will take over administrative control of all mosques, seminaries, and humanitarian-relief facilities run by JeM, LeT, and other groups; it plans to offer avenues to earning a livelihood for those not deemed an armed threat; and it will encourage members of these groups to enter mainstream politics.

Critics—India chief among them—argue that they have seen this all before, and to some extent, they have. The JeM-run al-Noor mosque and seminary in the eastern city of Sialkot, for example, was sealed by police on Tuesday. Three years ago, the same facility was closed after JeM claimed responsibility for an attack on an Indian air base in Pathankot.

Still, among analysts and diplomats, there seems to be a consensus that things are changing in Pakistan due to factors in and out of its control.

First, India’s air strikes on Pakistani soil following last month’s suicide bombing—the first time such military action has been taken since the two sides were at war in 1971—showed that the Indian military is willing to cross into its neighbor’s territory, despite the fact that both countries now possess nuclear weapons.

“The military-escalation ladder has been crossed,” says Simbal Khan, an Islamabad-based security analyst. “It didn’t go down the way that both sides had thought … but there is now no going back.”

Second, relations between the civilian government and Pakistan’s military, which has ruled the country for roughly half of its 71-year history and still largely determines security and foreign policy, seem to have stabilized since the assumption of power by Imran Khan in elections last year. Since the ouster of Nawaz Sharif, who was convicted and jailed on corruption charges after being dismissed as prime minister in 2017, the relationship between the military and the government has appeared to grow closer. Sharif, then a third-term prime minister, had explicitly confronted the military.

“They don’t have that bad blood with Imran,” Simbal Khan told me. “They have far more power in his government. On the foreign-policy front, they are literally running the show, with no pushback.”

Indeed, the military has backed Khan’s peace overtures in recent months, and diplomats and analysts I spoke with indicated that in policy circles, there has been a marked change in the past year, with even some in power suggesting that Pakistan’s support for armed groups was causing more harm than good. Many militants not only move between the various groups, but have also been implicated in attacks against government facilities, according to Hassan Akbar, the director of programs at the Islamabad-based Jinnah Institute think tank. “Pakistan’s relationship with these organizations has also changed,” he told me. “This remains an underappreciated point.”

Pakistan is also on the ropes financially, and far more susceptible to external pressures as its economy faces a spiraling account deficit and dwindling foreign reserves, all as its government grapples with a weakening relationship with the United States.

Chaudhry added that action against armed groups was also being taken because of the requirements of the Financial Action Task Force (FATF), an intergovernmental body that works to curb terrorism financing. Last year, the FATF threatened to blacklist Pakistan—a move that would see Pakistan’s faltering economy isolated from the international banking system—if it did not carry out such a crackdown. Multiple diplomats I spoke with concurred, indicating that Pakistan must act now against these groups, or face punitive measures. A final decision from the FATF is expected in May.

Shutting down the al-Quba mosque and others like it is one way to avoid international punishment. But the country will have to go further, Simbal Khan said, by taking serious, verifiable action against militant groups’ leaders.

“First you pick up every known big name [in the organizations]. Then you categorize them, convict some of them, put others in jail,” she told me.

“Arrest and dismantle. Other than this, there is no other verifiable way.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.