FILE - In this Jan. 28, 2016 file photo, Supreme Court Justice Ruth Bader Ginsburg speaks at Brandeis University in Waltham, Massachusetts. Ginsburg said she regretted comments on Republican presidential candidate Donald Trump.
FILE - In this Jan. 28, 2016 file photo, Supreme Court Justice Ruth Bader Ginsburg speaks at Brandeis University in Waltham, Massachusetts. Ginsburg said she regretted comments on Republican presidential candidate Donald Trump.

U.S. Supreme Court Justice Ruth Bader Ginsburg, who was engaged in an unprecedented war of words with Donald Trump, said Thursday her critical comments about the presumptive Republican presidential nominee were "ill-advised."

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

U.S. Supreme Court justices almost never voice their opinions about U.S. political campaigns, adhering to long-standing legal ethical standards against such commentary and because they could be called on to help decide an election, as occurred in 2000.

But Ginsburg, in several interviews with news outlets this week disparaged Trump, the billionaire real estate mogul who surged past a large field of Republican presidential contenders and is expected to claim the party's nomination at its national convention next week.

Ginsburg, who has well-known liberal views, said she expects Trump's Democratic opponent, former U.S. Secretary of State Hillary Clinton, to defeat him in the November national election. But she told The New York Times, "I can't imagine what this place would be -- I can't imagine what the country would be -- with Donald Trump as our president. For the country, it could be four years. For the court, it could be -- I don't even want to contemplate that."

Later, Ginsburg, at 83 the oldest justice, told the CNN television network, "He is a faker. He has no consistency about him. He says whatever comes into his head at the moment."

She added, "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."

Republican presidential candidate Donald Trump spe
Republican presidential candidate Donald Trump speaks at a rally in Westfield, Indiana, July 12, 2016.

Trump called her comments "highly inappropriate," as did legal analysts who cited normal strictures against judges offering their opinions about political candidates. A Washington Post editorial said it agreed with her political comments about Trump, but they "were still much, much better left unsaid by a member of the Supreme Court."

The unabashed Trump continued to denounce her Wednesday, saying on his Twitter account, "Justice Ginsburg of the U.S. Supreme Court has embarrassed all by making very dumb political statements about me. Her mind is shot -- resign!"

One justice short

U.S. presidents appoint members of the Supreme Court, subject to confirmation by the Senate. There already is one vacancy on the nine-member court because of the death last February of Justice Antonin Scalia, a conservative stalwart on the nation's top court for nearly 30 years.

Judge Merrick Garland, President Barack Obama's ch
FILE - Judge Merrick Garland, President Barack Obama's choice to replace the late Justice Antonin Scalia on the Supreme Court arrives at Capitol Hill in Washington, April 13, 2016.

President Barack Obama, a Democrat in his last months in office, named appellate court Judge Merrick Garland to fill the seat. But the Republican-controlled Senate has refused to consider Garland's nomination, saying it wants the next president to make the nomination, in hopes that Trump will defeat Clinton and then name a more conservative jurist.

By the time a new U.S. president is sworn in on January 20, 2017, three of the remaining eight justices will be 78 or older -- Ginsburg, Anthony Kennedy and Stephen Breyer -- leading to the possibility that either Clinton or Trump could have several vacancies to fill over the next four years if any of the justices retire or die in office.

With Scalia on the bench, the court's five conservative justices often held sway in key decisions over the court's four reliably liberal justices. But in the court term just ended, the court often philosophically split 4-4. Analysts believe that if Garland is eventually confirmed, the court's philosophical balance would shift toward more liberal rulings on such prominent U.S. issues as abortion, immigration, campaign finance rules and workers' rights.

Some Republican senators have said they might consider approving Garland's court appointment in a post-election session of Congress, if Clinton wins the election, in the belief that she might name an even more liberal justice than Garland once she assumes the presidency.

Trump has said he would name conservative judges to the high court, while Clinton almost certainly would appoint more left-leaning justices.

Some material for this report came from AP.