HARRISBURG -- Republican gubernatorial candidate Scott Wagner said Monday that he would pursue a mandatory death penalty for any school shooter who kills someone, although legal analysts said laws like that have been unconstitutional for decades.

The state senator from York County also said he would put an armed officer in every school building.

During an appearance at the Pennsylvania Press Club, Wagner said his message is "if someone kills one of our children, we will kill them."

Wagner's comments came in the context of the Parkland, Florida, school shooting that killed 17 people, and he turned the shooting into a line of attack against Democratic Gov. Tom Wolf.

"I have a very bold message for any coward who is deranged enough to consider attacking our children at school: when I am governor, these cowards will pay the ultimate price," Wagner said.

Wagner, who is running in a three-way primary for the GOP nomination to challenge Wolf's re-election bid this year, said he would introduce a bill while he remains in the state Senate that allows "no plea bargains, no life sentences and no mercy."

Robert Dunham, of the Washington, D.C.-based Death Penalty Information Center, said Monday that the U.S. Supreme Court has repeatedly ruled that it is unconstitutional for any system to impose the death penalty without allowing the jury to consider any factors that might call for mercy.

"There is absolutely no question that mandatory death sentences are unconstitutional, and any law that attempts to institute a mandatory death penalty would be struck down as unconstitutional," Dunham said.

Marc Bookman, of the Atlantic Center for Capital Representation in Philadelphia, said mandatory death sentences have been unconstitutional since 1976 when the U.S. Supreme Court threw out a North Carolina law that imposed a mandatory death sentence for the crime of first-degree murder.

Still, Wagner sought to turn the death penalty issue against Wolf, saying that the Democratic governor's de facto moratorium on the death penalty in Pennsylvania means Wolf would protect someone like the Florida school shooter.

"Tom Wolf would prioritize the life of an evil school shooter over the lives of innocent school children, over those who grieve for them and over those who sought to protect them," Wagner told the crowd at the press club.

Wagner also said he would find state dollars to pay for armed officers in every school building. There are more than 6,000 school buildings, according to state figures, potentially requiring the hiring of an armed force bigger than the Pennsylvania State Police, already one of the nation's biggest police forces.

A Democratic Party spokeswoman responded that Wagner had voted against budget legislation that carried more money for a safe schools initiative.

"Now he says he opposes common sense background checks and supports putting more guns in schools," spokeswoman Beth Melena said.

Wolf has previously backed legislation to expand background checks and ban the sale of assault weapons. Wagner said the Florida school shooting had not made him rethink his stances against stronger gun control, and he said he did not think stronger gun control laws would have prevented the shooting.

Pennsylvania hasn't executed anyone since 1999. Wolf shortly after taking office in 2015 that he would not sign any death warrants, saying he was concerned about a system that is "ineffective, unjust, and expensive."

Wolf has said the moratorium will say in place until a state Senate-commissioned study of capital punishment is complete.