Supreme Court Justice Ketanji Brown Jackson was slammed on Wednesday after she compared a Tennessee law banning gender transitions for minors to past laws banning interracial marriage.

Jackson and the other justices heard over two hours of oral arguments during the U.S. v. Skrmetti case, which involves the constitutionality of state laws banning gender transition medical procedures for minors.

U.S. Solicitor General Elizabeth Prelogar argued that state laws have the effect of "sex discrimination," since the minor's gender is key when determining specific medical treatments for those seeking to transition.

Supreme Court Justice Ketanji Brown Jackson

Supreme Court Justice Ketanji Brown Jackson triggered backlash on Wednesday after she compared a case regarding healthcare for transgender minors to bans on interracial marriage, evoking the landmark Loving v. Virginia case in 1967. (Tom Williams/CQ-Roll Call, Inc via Getty Images)

After Prelogar's remarks and exchanges with the other justices, Jackson said that she saw a "parallel" between U.S. v. Skrmetti and the landmark Loving v. Virginia case in 1967. 

"Interesting to me that you mentioned precedent, because some of these questions about sort of who decides and the concerns and legislative prerogatives, etc., sound very familiar to me," Jackson said. "They sound in the same kinds of arguments that were made back in the day—50s, 60s—with respect to racial classifications and inconsistencies. I'm thinking in particular about Loving v. Virginia, and I'm wondering whether you thought about the parallels, because I see one as to how this statute operates and how the anti-miscegenation statutes in Virginia operated."

SOTOMAYOR COMPARES TRANS MEDICAL 'TREATMENTS' TO ASPIRIN IN QUESTION ABOUT SIDE EFFECTS DURING ORAL ARGUMENTS 

Jackson also said there was a "potential comparison" between the Loving case and Skrmetti and wondered if Virginina could have banned interracial marriage by following Tennessee's reasoning. 

Ketanji Brown Jackson with Biden and Harris

Supreme Court Justice Ketanji Brown Jackson was picked by President Biden. (Photo by Collection of the Supreme Court of the United States via Getty Images) (Collection of the Supreme Court of the United States via Getty Images)

Jackson’s comments caused an uproar on social media. 

SUPREME COURT WEIGHS TRANSGENDER YOUTH TREATMENTS IN LANDMARK CASE

Rep. Matt Gaetz, R-Fla., called Jackson’s statements an embarrassment to the Supreme Court.

"Yes, because banning a white person from marrying a black person is the same thing as cutting off a 10-year-old's gen*tals," co-owner of Trending Politics Collin Rugg said.

"How can someone who doesn't know what a woman is rule on a case involving gender?" one commentator posted, referring to Jackson's confirmation hearing when she was asked to define what a woman is and wasn't able to. 

Tennessee attorney general

The Tennessee Attorney General Jonathan Skrmetti told Fox News Digital that GOP officials refusing to abide by the Biden administration’s revisions to Title IX "undermines the rule of law."

"Supreme Court Mad Libs," said Greg Scott, a communications consultant. "We are living in unserious times," he added.

Fox News' Shannon Bream and Bill Mears contributed to this report.