ISLAMABAD, Pakistan - 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 after 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 home-grown militants. Pakistani political leaders appeared together last week in the capital of Islamabad to embrace the government's new antiterror measures, which include registering all religious schools and blocking funding of extremist groups.

In all, 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 communications by terrorists, and establish a 5,000-member paramilitary force that can take the fight 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 remote tribal areas bordering Afghanistan.

U.S. officials and Western analysts note Pakistan has a nearly decade-long history of making promises to combat terrorism that it proved unwilling or unable to keep. They remain skeptical that Pakistan has the wherewithal to sustain a 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 steps to address them.

Pakistan finds itself at a crossroads. Over the last decade, more than 50,000 of its civilians and soldiers have been killed in terrorist attacks and 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; many were on the fast track toward careers in the military, which is highly esteemed in this country.

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

The attack also touched Pakistanis because it occurred on the anniversary of one of the country's bleakest moments. On Dec. 16, 1971, the army suffered a humiliating defeat in the Indo-Pakistan war, which led half of the country to break away and form the nation of Bangladesh.

Even before the siege of the school, Pakistani authorities had launched a major military operation in the northwestern part of the country to drive the Pakistani Taliban and other Islamist groups from the lawless border region. A senior American official, who asked not to be identified 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 more than 1,500 terrorists have been killed and vast quantities of weapons have been seized. The U.S. official said the militants' bases and communications abilities have been disrupted.

The school massacre has allowed the country's powerful army chief, Raheel Sharif, to exert even more influence, and has stressed to political leaders that tough new policies were needed.

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 coming months now that the six-year moratorium has been lifted.

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.