The state Supreme Court on Wednesday took action against two New Jersey judges who have faced intense scrutiny for comments they made from the bench in separate rape cases.

New Jersey’s highest court announced it was immediately ending the service of Monmouth County Superior Court Judge James Troiano at the judge’s request.

Troiano, who had been recalled from retirement to hear cases on a temporary basis, drew criticism for saying a teenage boy should not be tried as an adult for rape in part because he “comes from a good family.”

The court also said it was beginning proceedings to remove Ocean County Superior Court Judge John Russo Jr., and was suspending him without pay from his $181,000-a-year job effective immediately.

Russo Jr. was criticized after asking a woman at a hearing if she “closed (her) legs” to avoid being raped.

State Supreme Court Chief Justice Stuart Rabner also announced Wednesday he asked the state’s Director of the Administrative Office of the Courts to develop an “enhanced” training program for all judges and court employees in New Jersey.

“Every effort must be made not to re-victimize a victim,” Rabner wrote. “Sexual assault is an act of violence. It terrorizes, degrades, and induces fear in victims. Without question, it is a most serious matter in which fault lies solely with the perpetrator, not the victim."

Gov. Phil Murphy praised the high court for its swift response "to uphold the reputation of our judiciary and ensure that all who seek justice are treated with dignity and respect.”

“New Jersey’s judiciary has long been held up by observers across the nation as a model for other states," Murphy added. “Unfortunately, the inexcusable actions of several judges over recent months have threatened this reputation for thoughtful and reasoned opinion, and common decency.”

Troiano had rejected a prosecutor’s request to try a 16-year-old boy as an adult for allegedly raping a girl at a 2017 party and sharing video of it with his friends, saying the boy “comes from a good family who put him in an excellent school where he was doing extremely well."

Last week, Russo expressed remorse for his remarks in a hearing before the state Supreme Court.

Russo, the former mayor of Toms River, is the son of the late state Sen. John F. Russo Sr.

A third New Jersey judge, state Superior Court Judge Marcia Silva of Middlesex County, has also been under fire in recent weeks. The Supreme Court did not take any action against her on Wednesday or mention her in the documents released Wednesday.

“In the rare case when a judge’s conduct calls for ethical review and potential discipline, the process requires a careful examination of the full record in context, not a rush to judgment,” Rabner said.

Silva denied a prosecutor’s request to try a 16-year-old boy as an adult for allegedly raping his 12-year-old girlfriend while they and their families were sharing a home in 2017.

Silva said that even if the girl’s claim was true, “the offense is not an especially heinous or cruel offense beyond the elements of the crimes that the waiver statute intends to target," according to Silva’s ruling.

“The victim did not suffer any physical or emotional injuries as a result, other than the ramifications of losing her virginity, which the court does not find to be especially serious harm in this case," Silva said.

At least 14 members of the 80-member state Assembly, including Assembly Speaker Craig Coughlin, D-Middlesex, have issued statements seeking Silva’s and Troiano’s removal. State Senate President Stephen Sweeney, D-Gloucester, has also called on the judges to be removed.

Four state senators representing Middlesex County lodged a formal complaint against Silva with the state Advisory Committee on Judicial Conduct on July 5. Judiciary spokesman Peter McAleer confirmed Wednesday that Silva remained on the job hearing cases in the Family Division in Middlesex County.

The committee could recommend to suspend, censure or remove Silva after its investigation.

During his call-in radio show Wednesday night, Murphy declined whether he believes Silva should also be removed, stressing that it’s up to the state Supreme Court.

“We can’t do a Donald Trump here and start attacking institutions,” the Democratic governor said on WBGO public radio, referencing the Republican president he often criticizes. “There’s a process.”

State Sen. Kristin Corrado, R-Passaic, commended Rabner and the justices “for taking seriously the concerns that many of us have raised regarding the abhorrent treatment of sexual assault victims in our state’s courtrooms."

“These are good first steps that will begin the process of restoring the confidence of survivors to seek the justice they deserve through our courts,” Corrado said.

State Senate Majority Leader Loretta Weinberg, D-Bergen, said the training session the court announced is a “strong step in the right direction, one that will go a long way in maintaining the integrity and reputation of our courts for years to come."