Cop killers in Massachusetts could face the death penalty under a new bill filed by lawmakers in response to a rash of police slayings in recent years.

“Our law enforcement officers are under attack and under assault,” said state Rep. Shaunna O’Connell, who filed the bill with Rep. David DeCoste, the Boston Herald reported. “We need to show our law enforcement officers that we support them, that we stand with them and we need to show criminals that, if you take the life of a law enforcement officer, you’re going to face that same fate.”

The legislation would give judges the option of sentencing people over 18 to death for killing a police officer.

CALIFORNIA'S GOV. NEWSOM ISSUES A MORATORIUM ON DEATH PENALTY EXECUTIONS IN STATE

The Republican lawmakers were prompted to act after the deaths of three police officers in the line of duty: Weymouth Sgt. Michael Chesna, Yarmouth Sgt. Sean Gannon and Auburn police officer Ronald Tarentino.

“The murder of Sergeant Chesna simply reinforced my belief that juries should have the option of executing criminals who murders police officers,” DeCoste told the Herald, adding that the officer's family lives in his district. “Police officers represent the line between civilization and anarchy. When we start tolerating people who execute police officers, we’re dabbling with anarchy.”

The bill could face opposition from death penalty opponents. Boston-based attorney Martin Rosenthal told the paper he’s against the bill for the same reasons he opposed a failed1990s proposal to reinstate the death penalty in Massachusetts.

NEW JERSEY MANSION MURDERS SPUR CALLS FOR STATE TO REINSTATE DEATH PENALTY

“I yield to nobody in my respect for police officers, but I do not think their lives are worth more than the average person,” Rosenthal said. “The death penalty perpetuates a cycle of revenge and I actually believe that it creates a more violent society.”

The bill is similar to one filed earlier this week by U.S. Pat Toomey, R-Pa. The Thin Blue Line Act would extend a requirement by federal juries to factor in the victim’s profession as a federal law enforcement officer or federal prosecutor to local police, prosecutors and first responders.

CLICK HERE TO GET THE FOX NEWS APP

President Trump has also reiterated calls for harsher punishment for convicted cop killers.

“The ambushes and attacks on our police must end, and they must end right now,” Trump said during a recent speech for the National Peace Officers’ Memorial Day service on Capitol Hill. “We believe that criminals who murder police officers should immediately, but with trial, get the death penalty.”