RICHMOND — Gov. Ralph Northam on Tuesday vetoed bills that would have imposed mandatory minimum sentences on repeat domestic abusers and killers of police animals, vowing not to sign any legislation for the rest of his term that strips discretion from Virginia judges.

Northam (D) framed his decision in terms of racial justice, which he has sought to make the focus of his governorship since February, when he became mired in a scandal over his use of blackface as a young man.

He said that racial minorities are disproportionately affected by mandatory minimum sentences that tough-on-crime politicians have put on the books in recent decades.

The son of a retired Eastern Shore judge, Northam signed a new mandatory minimum bill — for the murder of a police officer — into law earlier this year. But that will be his last, he said in a statement announcing the vetoes, and in an op-ed published online Wednesday in The Washington Post.

“In recent weeks, I have visited with community leaders across the state seeking input on how I can best use the power of the governor’s office to make our commonwealth fairer and more equitable for communities of color,” Northam wrote. “My commitment today will not solve all of the issues with our criminal justice system, but I believe it is a step in the right direction.”

The vetoes won praise from Marc Mauer, executive director of the Sentencing Project, which advocates for the reduced use of incarceration.

“There’s been chipping away at some mandatory sentencing penalties in recent years, but this is a pretty bold statement, to flatly come out to say he’ll refuse to sign any new such policies,” Mauer said.

Reviews were more mixed among legislators, with the harshest criticism coming from House Majority Leader Todd Gilbert (R-Shenandoah). He had teamed up with a Fairfax County Democrat, Del. Kathleen J. Murphy, on the bill related to domestic abusers. The measure would have required that repeat offenders be sentenced to a minimum of 60 days in jail.

“When Republicans called on Ralph Northam to resign in February, it was because we felt he could no longer effectively govern,” Gilbert said. “Today’s vetoes are proof of that. When given the choice of protecting women who have survived domestic abuse or attempting to repair his own racist legacy, he put himself first.”

In an email to fellow legislators and some Democrats who represent Virginia in Congress, Murphy described herself as “heart broken” by Northam’s veto. She did not respond to a request for comment.

The other vetoed bill, sponsored by Sen. Bryce E. Reeves (R-Spotsylvania), would have required a minimum of six months in jail for anyone convicted of maliciously killing or wounding a law-enforcement animal, such as a police dog or horse.

Both bills passed the House and Senate by wide margins, with just a few liberal Democrats opposed in each chamber, including some members of the Legislative Black Caucus. One Republican, Sen. David R. Suetterlein (Roanoke), joined opponents on the police animals bill.

Lawmakers rejected amendments to the bills proposed by Northam when they met for their annual “reconvene session” in March. They will not have a chance to override the vetoes.

“While violence is unacceptable, these are crimes that can be addressed by a judge with full knowledge of the facts and circumstances of each particular case,” Northam wrote. “Piling on mandatory minimum sentences has contributed to our growing prison population over the past few decades, to the point that the United States has the highest rate of incarceration in the world.”

Several members of the Black Caucus applauded Northam’s action, including Sen. Jennifer L. McClellan (D-Richmond) and Del. Jerrauld C. “Jay” Jones (D-Norfolk).

“The whole point of the judicial system and [having] judges and juries is so they can weigh the facts of a particular case and come to a sentence that fits those circumstances,” McClellan said. “And mandatory minimums take that discretion away.”

Jones said he supports broader criminal-justice reform, which would include moving away from one-size-fits-all sentencing.

“No one here is condoning domestic violence, but . . . [punishment] needs to be incredibly thoughtful,” he said.

Northam had just completed his first year in office when a racist picture from his 1984 medical school yearbook page surfaced.

The governor initially apologized and said he was in the photo, which showed one person in blackface and the other under a Ku Klux Klan hood. The next day he recanted, saying he was not in the picture but acknowledging that he had put shoe polish on his cheeks to imitate Michael Jackson in a dance contest that same year.