Sen. Cory Booker asked judicial nominee Neomi Rao during a hearing Tuesday if she believed same-sex relationships were “immoral.”

“Are gay relationships, in your opinion, immoral?” Booker, D-N.J., asked Rao, who is nominated to be on the United States Court of Appeals for the District of Columbia Circuit. If confirmed, Rao would replace Brett Kavanaugh, who became a Supreme Court justice last fall.

He later added, “So you’re not willing to say here … whether you believe it is sinful for two men to be married, you’re not willing to comment on that?”

“My response is that these … personal views are ones that I would put to one side,” said Rao, who is currently the administrator of the Office of Information and Regulatory Affairs at the White House. “Whatever my personal views are on this subject, I would faithfully follow the precedents of the Supreme Court.”

Previous judicial nominees have faced similar questions from Democratic senators. Sen. Dick Durbin, D-Ill, asked Amy Coney Barrett, “Do you consider yourself an orthodox Catholic?” in a 2017 hearing, when Barrett was a nominee for the 7th Circuit Court. In that same hearing, Sen. Dianne Feinstein, D-Calif., said to Barrett, who is Catholic, “The dogma lives loudly within you, and that’s of concern.”

In December, Democratic Sens. Mazie Hirono of Hawaii and Kamala Harris of California asked Brian Buescher, who is nominated to be on a district court in Nebraska, about his membership in the Knights of Columbus, a Catholic organization.

Sen. Ted Cruz, who is on the Senate Judiciary Committee with Booker, expressed concern about the “growing pattern among Senate Democrats of hostility to religious faith,” and said the Judiciary Committee should not be “an avenue for persecution.”

“I have to say, I was deeply troubled a few minutes ago to hear questioning of a nominee, asking your personal views on what is sinful. In my view that has no business in this committee,” Cruz, R-Texas, added.

Cruz continued:

Article VI of the Constitution says there shall be no religious test for any public office. We have also seen Senate Democrats attack what they’ve characterized as religious dogma. We’ve seen Senate Democrats attack nominees for their own personal views on salvation.

I don’t believe this a theological court of inquisition, I think the proper avenue for investigation of this committee is a nominee’s record.

Elizabeth Slattery, a legal fellow at The Heritage Foundation, said that “some senators don’t understand that judges must put their personal beliefs aside and rule based on what the Constitution and laws dictate.”

“The Constitution expressly prohibits religious tests for public office,” Slattery said, “but that hasn’t stopped several senators from asking inappropriate questions about a judicial nominee’s faith—such as Sen. Dianne Feinstein chastising Amy Coney Barrett for her Catholic faith or Sens. Kamala Harris and Mazie Hirono’s suggesting that membership in the Knights of Columbus should disqualify a district court nominee from office.”

Rao, a former intern at The Heritage Foundation, was the recipient of the organization’s Distinguished Alumni Award last year.

Booker first questioned Rao about comments made in 2008 regarding the Lawrence v. Texas Supreme Court decision.

“In a 2008 article you criticized the Supreme Court’s landmark decision in Lawrence v. Texas, which invalidated the state laws that criminalized same-sex relationships. You said that the court’s decision, quote, ‘eschews older traditions in favor of an emerging awareness of the meaning of the scope of liberty.”

“Lawrence is a precedent of the Supreme Court, which I would faithfully follow,” Rao said.

The American Bar Association announced Monday it had rated Rao as “well-qualified” to be on the D.C. Circuit.