The Senate confirmed a controversial judicial nominee Wednesday over objections from civil rights groups and Democrats who criticized President Trump’s pick as being hostile to the LGBTQ community.

Just one Republican, Sen. Susan Collins (Maine), joined every voting Democrat to oppose Matthew Kacsmaryk’s lifetime appointment to the federal bench in the Northern District of Texas. He was confirmed, 52 to 46.

“Mr. Kacsmaryk has demonstrated a hostility to the LGBTQ bordering on paranoia,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said before the vote. “It’s unbelievable that this man has been nominated, and he’s not alone. The parade of narrow-minded, often bigoted people who we’re putting on the bench. . . . One Republican senator rightfully voiced concerns about this man’s fitness. Where are the others?”

Collins, in a statement last week announcing her intention to vote “no,” said Kacsmaryk’s “extreme statements” on LGBTQ and reproductive rights issues “reflect poorly on Mr. Kacsmaryk’s temperament and suggest an inability to respect precedent and to apply the law fairly and impartially.”

While Collins, who had angered LGBTQ and women’s rights groups with her vote for Supreme Court Justice Brett M. Kavanaugh, sided with them this time, Sen. Lisa Murkowski (R-Alaska), another ally of those groups who voted against Kavanaugh, did not.

Murkowski’s office did not return a request for comment about her vote for Kacsmaryk.

“The courts have been at the forefront of securing LGBTQ equality on many fronts, including the necessary and lifesaving legal protections opposed by Kacsmaryk and many other Trump nominees,” said Gillian Branstetter, spokeswoman for the National Center for Transgender Equality. “We would hope any lawmaker who believes in the need for that equality would understand the importance of inoculating the legal system from the kinds of bias and prejudice held by Kacsmaryk.”

Opponents of Kacsmaryk’s nomination point to his writings, in which he has described being transgender as a “mental disorder,” called homosexuality “disordered” and said that “sexual revolutionaries” had made the unborn child and marriage secondary to “erotic desires of liberated adults.”

“This person being in a position of power anywhere in government would be deeply troubling, but his lifetime appointment to the federal bench by Trump and Pence will now present a clear threat to the rights and livelihoods of LGBTQ people for decades to come,” said Charlotte Clymer, press secretary for the Human Rights Campaign. “It is unconscionable that this person would be confirmed to arbitrate our constitutional rights despite his outspoken hatred towards LGBTQ people.”

Kacsmaryk most recently served as deputy general counsel at First Liberty Institute, a legal organization that defends religious freedom cases. His former boss there, Kelly Shackelford, president and CEO, said after the confirmation vote: “Matthew has spent his career fighting to defend our God-given, Constitutionally protected rights. Matthew’s confirmation is further evidence that presidential appointees who strictly adhere to the text of the Constitution and the Founders’ original intent for our most fundamental freedoms, including religious liberty, can and will be confirmed by the U.S. Senate.”

Several Democrats and advocates pointed out the particular sting of Kacsmaryk’s confirmation occurring during Pride Month.

Editor’s note: An earlier version of this article misstated the first name of Matthew Kacsmaryk.