Sen. Ben Sasse, R-Neb., is preemptively defending Judge Amy Coney Barrett -- one of several rumored contenders for President Trump's upcoming Supreme Court nomination -- from attacks on her religious beliefs.

During her confirmation hearing when she was named to the 7th U.S. Circuit Court of Appeals in 2017, the devout Catholic was subjected to accusations and questions based on her religious beliefs. Sasse noted that this approach pushes the boundaries of what is legal.

DEMS' 'DISGRACEFUL' ATTACKS ON AMY CONEY BARRETT SHOW WHAT THEY THINK ABOUT WOMEN, CHRISTIANS: SARAH SANDERS

"Attacks on religious liberty have no place in Congress," Sasse said in remarks to the Daily Caller News Foundation. "The Constitution is pretty simple: No religious tests for office, period."

The basis for the grilling was a 1998 law review article Barrett co-wrote with a professor while she was still a student. The article, “Catholic Judges in Capital Cases,” dealt with how some religions are against the death penalty and how religious judges might approach death penalty cases. The article mainly focused on Catholic judges since Barrett and her co-author are Catholic.

The article suggests that judges can recuse themselves if their religious beliefs keep them from properly applying the law.

"Judges cannot--nor should they try to--align our legal system with the Church’s moral teaching whenever the two diverge," the article said.

Yet despite the article stating that judges should not let religious ideology influence their decisions on the bench, Barrett, then a law professor at Notre Dame, was treated as though her faith would indeed cloud her judgment.

WHAT TO KNOW ABOUT THE TOP FEMALE JUDGES BEING MENTIONED FOR SCOTUS

Sen. Dianne Feinstein, D-Calif., addressing Barrett's background, including speeches she had given, claimed the degree of her religiosity was problematic.

"I think in your case, professor, when you read your speeches, the conclusion one draws is that the dogma lives loudly within you,” Feinstein said. “And that’s of concern."

Sen. Dick Durbin, D-Ill., asked Barrett how she characterizes her own faith. Barrett's law review article used the phrase "orthodox Catholic" - -borrowing from the concept of orthodox Judaism -- and Durbin asked if she would describe herself this way. Barrett explained there is no such thing as an orthodox Catholic but that the article used the phrase "for lack of a better term."

“I am a Catholic, Sen. Durbin,” Barrett confirmed, adding that her faith “would not bear on the discharge of my duties as a judge."

Sasse condemned the treatment Barrett endured during that hearing in his remarks to the Daily Caller News Foundation, saying she "faced some disgusting attacks on her faith." He went on to say Barrett and others have faced "anti-Catholic bigotry" that he finds "reprehensible."

Sasse defended Barrett during that 7th Circuit confirmation hearing, implying some senators had crossed the line.

"I think some of the questioning that you have been subjected to today seems to miss some of these fundamental constitutional protections we all have," he said.

CLICK HERE TO GET THE FOX NEWS APP

Barrett herself addressed the issue of faith and the judiciary while speaking at Hillsdale College in Washington, D.C., in May 2019.

"I think when you step back and you think about the debate about whether someone’s religion has any bearing on their fitness for office, it seems to me that the premise of the question is that people of faith would have a uniquely difficult time separating out their moral commitments from their obligation to apply the law,” Barrett said. “I think people of faith should reject that premise.”