With capital punishment, Mr. Newsom is not at the vanguard of the opposition movement. The death penalty has been on the decline in America for two decades. But it has become a defining issue for him, widening the dividing line between California and the policies of President Trump, who has spoken out in favor of the death penalty, even for drug dealers.

After the news of Mr. Newsom’s decision broke, Mr. Trump said on Twitter: “Defying voters, the Governor of California will halt all death penalty executions of 737 stone cold killers. Friends and families of the always forgotten VICTIMS are not thrilled, and neither am I!”

Speaking several hours later, Mr. Newsom said he had met with families of victims and they had expressed passionate but conflicting views on capital punishment. But the governor made it clear that his decision came down to his own conscience, prodded by impending decisions such as whether to support the state’s lethal injection protocol.

An executive order Mr. Newsom signed on Wednesday does three things: grants reprieves to the inmates currently on death row — they will still be under a death sentence, but not at risk of execution; closes the execution chamber at San Quentin prison; and withdraws the state’s lethal injection protocol, the formally approved procedure for carrying out executions.

“Three out of four nations in the world know better and are doing better,” Mr. Newsom said. “They’ve abolished the death penalty. It’s time California join those ranks.”

Supporters of the death penalty predicted legal challenges to any moratorium. Michele Hanisee, the president of the Association of Deputy District Attorneys in Los Angeles said that reprieves for condemned inmates would be, “in effect, invalidating the law” that California voters have repeatedly affirmed, despite the liberal values that dominate the state.

“I think it surprises me too, sometimes,” she said. “California is liberal, I think we all know that. We have Hollywood, and the music industry, which I think affects people’s thinking. I think with the death penalty it comes down to specifics of cases. We have serial killers and lots of bad people in California.”