Pakistani paramilitary soldiers and police officials search for suspects in a residential area of Islamabad following a massacre this week at an army-run school. (Sohail Shahzad/EPA)

After pledging for years to crack down on violent Islamists, Pakistani authorities are now taking exceptional steps to do so, with a major military operation against the militants and a vow to rein in radical propaganda.

The government’s campaign has intensified in the wake of a massacre at an elite army-run school in Peshawar this month, reflecting a striking change in public opinion about the danger posed by the extremist groups.

The new effort also suggests an important political shift in a country where parties have traditionally laid out competing views on how to confront homegrown militants. Pakistani political leaders appeared together last week in Islamabad, the capital, to embrace the government’s new anti-terrorism measures, which include registering all religious schools and blocking funding of extremist groups.

Prime Minister Nawaz Sharif’s government and the country’s powerful military have agreed on 20 steps to tackle the terrorist threat. The government plans to try terrorism suspects in military courts, block the use of social media and other forms of communication by terrorists, and establish a 5,000-member paramilitary force that can take the fight against militancy deep into Pakistani cities.

The army has vowed to further expand its military offensive against the Pakistani Taliban and groups such as al-Qaeda in the country’s remote tribal areas bordering Afghanistan.

U.S. officials and Western analysts note that Pakistan has a nearly decade-long history of making promises to combat terrorism that it proved unwilling or unable to keep. And they remain skeptical that Pakistan has the wherewithal for a sustained campaign against an Islamist militancy that includes groups suspected of longtime ties to Pakistani intelligence officials.

Still, Obama administration officials say they are encouraged that, after years of delay, Pakistan’s leaders have acknowledged the problems they face and are starting to take determined steps to address them.

They cite signs that Pakistan is improving coordination with Afghanistan, where Pakistani Taliban commanders have traditionally sought shelter. Pakistan has also been tempering its public condemnations of U.S. drone strikes that target militants on its soil. But it is unclear whether Pakistan ultimately can change a culture of extremism rooted in some religious schools and mosques and allowed to fester for years in the country’s lawless tribal belt.

‘A very critical juncture’

Pakistan finds itself at a crossroads. Over the past decade, more than 50,000 Pakistani civilians and soldiers have been killed in terrorist attacks and in the fight against extremists. The rising violence has wrecked the economy and threatened the nuclear-armed country’s ties to the West.

But many of the attacks have generated little outrage in a public that had become inured to violence.

The Dec. 16 assault on the school, however, was a deeply personal blow to Pakistanis. Not only were most of the 149 victims teenagers, but many also were on the fast-track toward careers in the military, which is highly esteemed in this country. Even conservative religious scholars are now rallying behind the government’s offensive.

“Pakistan is fighting its own war of existence and at a very critical juncture,” said Allama Tahir Ashrafi, a noted Islamic scholar who heads Pakistan’s religious clerics council. “It is a do-or-die situation for Pakistan.”

The attack touched Pakistanis not just because of the age of many of the victims. It occurred on the anniversary of one of Pakistan’s bleakest moments. On Dec. 16, 1971, the Pakistani army suffered a humiliating defeat in the Indo-Pakistani war, which led to half of the country breaking away and forming the new nation of Bangladesh.

The school massacre also came as Pakistanis grow increasingly uneasy about radicalism in the region. NATO troops ended their 13-year combat mission in Afghanistan on Sunday, leaving behind just 12,500 coalition soldiers to help train and support the Afghan army in its fight against Taliban insurgents. Meanwhile, the Islamic State’s rise in Iraq and Syria has generated fears that Pakistani radicals could adopt the group’s brutal techniques.

Even before the siege at the school, Pakistani authorities had launched a major military operation in the country’s northwest to drive the Pakistani Taliban and other Islamist groups from the lawless border region. A senior American official, who spoke on the condition of anonymity in order to speak freely, said the ongoing offensive in North Waziristan is more serious in intent, longer in duration and greater in scope than the U.S. government had expected.

Pakistani officials say that more than 1,500 terrorists have been killed and that vast quantities of weapons have been seized. The U.S. official said the militants’ bases and communications abilities have also been disrupted.

New political unity

The school massacre has allowed the country’s powerful army chief, Gen. Raheel Sharif, to exert even more influence and has underlined for political leaders the need for tough new policies.

Pakistan’s prime minister has adopted a more hawkish tone, too. On Saturday, he publicly rebuffed U.N. Secretary General Ban Ki-moon, who had called to urge him to reconsider his decision to resume executions of terrorists. As many as 500 prisoners held on terrorism charges could be hanged in the coming months now that the six-year moratorium has been lifted.

“The country is passing through extraordinary circumstances, which demand extraordinary measures,” Sharif told Ban, according to a statement from the prime minister.

Sherry Rehman, a former ambassador to the United States and a leader of the opposition Pakistan People’s Party, said Sharif is now leading with “clarity and resolve” and “doing his best to be a wartime leader.”

Muhammad Amir Rana, director of the Pak Institute for Peace Studies, said the release of the action plan marked the first time that all the country’s major political leaders have united in a “zero tolerance” policy on terrorism and extremist views.

Under the plan, Pakistan’s military will first target groups such as the Pakistani Taliban that pose “a direct threat” to the country.

To secure Afghanistan’s help in arresting or killing Pakistani militants living there, Pakistani forces will need to launch a parallel move against the Haqqani network and other Islamist groups in Pakistan that carry out attacks in Afghanistan, Rana said. Other groups that do not pose an imminent danger to either country would then have to be addressed, he said.

Pakistani leaders are encouraged that Afghanistan’s new president, Ashraf Ghani, has expressed a willingness to bolster security ties between the two countries. Former Afghan president Hamid Karzai often accused Pakistan of being the source of violent attacks inside Afghanistan.

Ghani has won assurances from Pakistan’s government that it will help organize reconciliation talks between the Afghan government and the Afghan Taliban, the U.S. official said.

Sharif, the Pakistani army chief, has also struck up a productive relationship with the new commander of coalition forces in Afghanistan, U.S. Army Gen. John F. Campbell.

Earlier this month, Sharif took Campbell on an aerial tour of North Waziristan so he could see the progress that Pakistani forces had made in clearing the area, according to a coalition official who spoke on the condition of anonymity because of the sensitivity of the matter.

Such gestures are helping to ease years of mistrust between U.S. forces and Pakistan’s military, which had been fed by a belief in Washington that this country had not done enough to control the flow of weapons and fighters across the border to Afghanistan.

U.S. officials still believe there is much more Pakistan needs to do to combat the Haqqani network. But the relationship is now stable enough that fruitful conversations about that militant group can be held, the U.S. official said.

Much of Pakistan’s military and civilian leadership has come to realize that Pakistan would also suffer if the Taliban returns to power in Afghanistan, said Marvin Weinbaum, a former analyst for Pakistan at the State Department who now directs the Center for Pakistan Studies at the Middle East Institute.

“There are finally indications that both sides realize they cannot succeed without the other,” Weinbaum said.

Despite the new steps by Islamabad, it could take years to seriously weaken the country’s extremist groups.

Weinbaum said there are still are no indications that either Pakistan or Afghanistan is prepared to make the kind of political changes and public investments needed for a long-term effort to combat militancy in the border region. Many tribal areas, for example, still lack clean drinking water and decent roads.

“There’s no question that the populations in these areas want everybody [in the militant groups] to go away,” Weinbaum said. “On the other hand, they have no great love for the government or the army with the behavior it engages in. It’s similar on the Afghan side. People have to choose, and it’s not easy.”

Another reason Pakistan’s new offensive could fall short is a lack of focus.

With Pakistan also facing an urgent problem with polio, chronic energy shortages and a history of political tumult, any domestic crisis could force the government to scale back its goal of eradicating terrorism, analysts say. A flare-up in tensions on Pakistan’s eastern border with India could also force the military to reassess its priorities.

Still, Rehman believes “this time will be different” because the faces of the dead and injured students will continue to haunt Pakistanis.

“They were children in a school. It was brutal, and it was targeted,” Rehman said. “Our soldiers are already on the front lines,” she added, and “we don’t need our children” endangered.

Morello reported from Washington. Shaiq Hussain in Islamabad and Haq Nawaz Khan in Peshawar contributed to this report.