Pakistan’s political leadership agreed Wednesday to establish military courts for suspects accused of terrorism or extremist views, upending the constitution in a bid to aggressively crack down on militants after last week’s school massacre in Peshawar.

After a day-long meeting to formulate a new counterterrorism strategy, Prime Minister Nawaz Sharif and the leaders of more than a dozen political parties said the courts would be created to shift the country onto a wartime footing.

Over the past week, Pakistan has lifted a six-year moratorium on executions, expanded its military operations against Islamist militants, rounded up hundreds of alleged terrorist sympathizers from major cities and forged closer military ties with neighboring Afghanistan to try to dislodge militants along the border.

In a solemn televised speech shortly after midnight, Sharif said the country will now go even further in responding to the Pakistan Taliban attack on the army-run school, which killed 149 students and teachers. “I have a very loud and clear message for those terrorists who killed our innocent children: There is no space for you in this country,” Sharif said. “The pain that you inflicted on us, you will receive a befitting response for that. The innocent children have drawn a line with their sacred blood.”

In addition to creating the courts, Sharif said the government would block funding of terrorist and extremist groups, curtail their access to social media and other communications networks, and more closely scrutinize the country’s vast network of religious madrassas. And in a surprise move, Sharif even singled out militant groups in the country’s eastern Punjab province, many of which have been historically nurtured by Pakistan’s intelligence agency to target archrival India.

Sharif, who until this summer advocated peace talks with the Taliban, said the army will form a new paramilitary force to more effectively respond to terrorist threats. But the new courts, which will be in effect for at least two years and are likely to unnerve some legal scholars, are the most direct sign to date that Pakistan plans a more muscular response to terrorism.

Currently, most terrorism cases are tried in civilian courts, except for attacks that directly target military installations or personnel. Pakistan’s clogged court system has come under repeated criticism from U.S. and Western officials who say too many suspects have been freed on technicalities or appeal.

Under the proposal agreed to Wednesday, a military official will serve as the judge in cases involving terrorism suspects. The goal of the courts will be to quickly dispense of those cases, officials said. It was not clear Wednesday night whether suspects tried in those courts would be able to appeal the judge’s ruling.

In an interview with Pakistan’s Geo Television, legal analyst Tariq Mehmood said he is concerned that the government is making hasty decisions that could have long-lasting ramifications.

“In our constitutional system, it’s the judiciary, only, that is meant to deliver justice,” said Mehmood, a retired high-court judge. “We have anti-terrorism courts in this country, and it’s true that there has been a long delay in some cases, but we need to do away with the problems that those courts and judges are facing instead of setting up military courts.”

The change is a sign that Pakistan’s powerful military is once again expanding its influence in domestic affairs. Pakistan has been governed by military dictators for nearly half of its history, since its founding in 1947, but last year the country completed its first transfer of power from one democratically elected government to another.

Sharif, however, has appeared to struggle with balancing civilian oversight of the military and coming across as a strong, decisive leader. And the attack on the Army Public School and College has left many Pakistanis clamoring for revenge.

Sharif pledged that he will “lead from the front” in Pakistan’s fight to eradicate “terrorism, extremism, sectarianism and intolerance.” But analysts say anger within the country is creating an opening for the new army chief, Raheel Sharif, who is not related to the prime minister, to consolidate his influence.

“The army is all-out against terrorists now, because the army leadership is in the forefront, and they know it’s time to act with full force,” said Shahid Latif, a former deputy chief of staff for Pakistan’s air force. “The civilian rulers have wasted years, but General Raheel and other military commanders are in no mood to continue with that now.”