Supreme Court Justice Ruth Bader Ginsburg said Thursday she regrets the critical comments she made about presumptive Republican presidential nominee Donald Trump, after facing a bipartisan backlash.

“On reflection, my recent remarks in response to press inquiries were ill-advised and I regret making them. Judges should avoid commenting on a candidate for public office. In the future I will be more circumspect,” she said in a statement.

Ginsburg had given an interview to The New York Times saying she didn’t “even want to contemplate” the country and court under a President Trump.

She later called him a “faker” in a separate interview with CNN.

"He has no consistency about him. He says whatever comes into his head at the moment. He really has an ego. ... How has he gotten away with not turning over his tax returns? The press seems to be very gentle with him on that," she said. 

Trump hit back, accusing Ginsburg of politicizing the Supreme Court and questioned her mental fitness.  

"She's a disgrace to the Supreme Court. For her to politicize the Supreme Court, this is all the more reason I hope I win, because I have 11 justices who are incredible justices, highly respected by all, including liberal people,” he told Bret Baier in an interview on Fox News' "Special Report."

“For her to come out and say [these] kind of things, there's almost something wrong with her," Trump added.

Trump also took to Twitter to respond to Ginsburg.

"Justice Ginsburg of the U.S. Supreme Court has embarrassed all by making very dumb political statements about me. Her mind is shot - resign!," he tweeted Wednesday.

His last pitch was a pointed reminder to conservatives of the importance of the election.

"If I win the Presidency, we will swamp Justice Ginsburg with real judges and real legal opinions!," he vowed.

Trump was hardly alone in taking Ginsburg to task.

“We all know that the justices on the Supreme Court have political views. I’m not sure we’re well served by them airing them out in the open,” Sen. Chris Murphy, D-Conn., told Politico.

“She may have got out over her skis a little bit and more forthright and political than she should have been. It’s very unusual,” Senate Minority Whip Dick Durbin, D-Ill., told the outlet.

Even mainstream media outlets chimed in on Trump's side.

“However valid her comments may have been, though, and however in keeping with her known political bent, they were still much, much better left unsaid by a member of the Supreme Court,” The Washington Post’s editorial board said Tuesday.

“Politicization, real or perceived, undermines public faith in the impartiality of the courts.”

The board noted the Code of Conduct for U.S. judges says that a “judge should not . . . publicly endorse or oppose a candidate for public office.” 

The New York Times also chimed in: “Washington is more than partisan enough without the spectacle of a Supreme Court justice flinging herself into the mosh pit."

The Associated Press contributed to this report.