In the middle of Pride Month and amid opposition from LGBTQ rights organizations, the U.S. Senate on Wednesday voted 52-46 to confirm Matthew Kacsmaryk to the U.S. District Court for the Northern District of Texas.

Kacsmaryk, deputy general counsel for the First Liberty Institute, a Texas-based religious rights nonprofit law firm, was criticized for past derogatory comments about transgender people, same-sex marriage and women's reproductive rights.

Senate Minority Leader Chuck Schumer, D-New York, said that Kacsmaryk has demonstrated hostility bordering on paranoia for LGBTQ people. As a judge with a lifetime appointment, Schumer questioned whether he'd be able to weigh both sides carefully, giving equal consideration to plaintiffs and defendants.

“Our judicial system is designed to protect liberties, not denigrate them,” he said, as he asked Republican senators to reject Kacsmaryk's confirmation.

Kacsmaryk didn't immediately return a call seeking comment.

First Liberty President and CEO Kelly Shackelford said in a statement that few people are more qualified or committed than Kacsmaryk, who's spent his career protecting constitutional rights.

“Matthew is one of the top legal minds in the country, a staunch defender of the constitution, and has even won a national award for his work as a federal prosecutor putting away dangerous terrorists,” Shackelford said. “He will make an excellent judge.”

President Donald Trump first nominated Kacsmaryk in September 2017, but senators in that session returned his unconfirmed nomination to the White House. In January 2019, Trump renominated Kacsmaryk for the same position.

Kacsmaryk earned his law degree from the University of Texas School of Law in 2003. Right out of law school, he was a Baker Botts associate who handled commercial, constitutional and intellectual property cases. In 2008, he became an assistant U.S. attorney in the Northern District of Texas, where he was mainly an appellate litigator in criminal and national security cases before the U.S. Court of Appeals for the Fifth Circuit. He joined First Liberty in 2013, where his practice focuses on religious liberty litigation in federal courts and amicus briefs before the U.S. Supreme Court.

The blog The Vetting Room, which follows federal judicial nominations, wrote that in 2014, Kacsmaryk said the Obama administration's directive for an LGBT anti-discrimination measure favored “sexual revolution fundamentalism over the sincerely-held religious beliefs of Americans.” He fought against the Obama administration's push for school districts to allow transgender students to use the bathroom that matched their gender identity. In his writings, he's been critical of same-sex marriage and the push to protect LGBTQ people under Title VII.

LGBTQ groups such as Lambda Legal, The National Center for Transgender Equality, Human Rights Campaign and other civil rights advocates fought to convince Republicans to break partisan ranks and reject the nominee.

“[Sen. Mitch] McConnell has his own way of celebrating Pride, which is to put on the floor this horrific nominee,” said Sen. Jeff Merkley, D-Oregon, in a Tuesday press call.

During the press call, Sharon McGowan, chief strategy officer and legal director for Lambda Legal, said the substance and tenure of Kacsmaryk's speeches and writings show a virulent bias against LGBTQ people.

Rep. Joe Kennedy, D-Massachusetts, said on the call, “We can't let bigotry and hate get a lifetime appointment to our judiciary.”

But Sen. Ted Cruz, R-Texas, said in a statement that he's glad the Senate confirmed Kacsmaryk to the bench.

“As a passionate constitutionalist, Matt has served Texas well in his various professional and public service roles and proven himself to be a remarkably experienced and deserving candidate for this vacancy,” said Cruz.

Sen. John Cornyn, R-Texas, said he's grateful for the Senate's vote.

“Matthew's experience as a federal prosecutor and advocate for the First Amendment will serve him well in this role,” said Cornyn.