The Senate voted Wednesday to confirm Matthew Kacsmaryk to the position of U.S. district judge for the Northern District of Texas, a lifetime appointment. His appointment riled Democrats and LGBTQ advocates who have opposed his nomination for almost two years.

Matthew Kacsmaryk First Liberty

Kacsmaryk is the latest in a series of judicial nominations to elicit alarm from LGBTQ and civil rights advocates over what they consider anti-LGBTQ track records. A 2017 report from Lambda Legal found that, of President Donald Trump’s nominees, “nearly one-in-three have records that demonstrate hostility towards the rights of LGBT people.”

Among advocates, concerns about Kacsmaryk are his opposition to LGBTQ anti-discrimination protections and same-sex marriage, along with his remarks concerning transgender children and adults.

Prior to his nomination, Kacsmaryk had been an assistant United States attorney for the Northern District of Texas and is currently the deputy general counsel at First Liberty Institute, a conservative nonprofit advocating for religious liberty. He is also a member of the Federalist Society, a conservative legal group to which many of Trump’s judicial nominees belong.

Kacsmaryk worked at the First Liberty Institute under Jeff Mateer, previously considered for a federal judgeship himself. Mateer withdrew from consideration after significant opposition to his nomination emerged. Specifically, LGBTQ and civil rights advocates cited Mateer’s anti-LGBTQ record, which included referring to transgender children as evidence of “Satan’s plan.”

Days before Wednesday’s Senate vote, Sen. Susan Collins, R-Maine, voiced her opposition to Kacsmaryk’s nomination due to his “alarming bias against LGBTQ Americans and disregard for Supreme Court precedents.” Collins’ opposition was not enough to defeat Kacsmaryk’s nomination Wednesday, with a final vote of 52-46.

Kelly Shackelford, president, CEO and general counsel for First Liberty Institute, said Kacsmaryk'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."

"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 continued.

In anticipation of the Senate vote, 75 national, state and local advocacy organizations supporting LGBTQ rights penned a letter to the Senate Judiciary Committee urging its members not to confirm Kacsmaryk. The letter called Kacsmaryk an “anti-LGBT activist” with a “history of targeting those who do not live according to his particular social and religious beliefs.”

In December of last year, more than 300 parents of transgender children signed a letter stating their opposition to Kacsmaryk’s nomination, calling his anti-transgender rhetoric “appalling and unacceptable.” The letter specifically called out his assertion that transgender people are “delusional,” made in a 2016 letter he signed opposing hospital regulations that prohibit discrimination on the basis of sexual orientation and gender identity.

Mara Keisling, executive director of the National Center for Transgender Equality, slammed the appointment.

“Transgender youth and their families are facing a crisis in this country, and they cannot afford an unqualified and clearly biased nominee like Matthew Kacsmaryk,” Keisling said in a statement shared with NBC News. “Our country needs fair-minded judges free of irrational prejudices against marginalized people.”

‘DANGEROUS IDEOLOGUE’ OR ‘LEFT-WING FEAR-MONGERING’?

Sharon McGowan, legal director at Lambda Legal, called Kacsmaryk a “dangerous ideologue” who is “unfit for public trust,” because he has consistently voiced broad opposition to the LGBTQ movement throughout his career.

“Both the substance and the tenor of Kacsmaryk’s writings and speeches give you a sense of just how virulently he opposes equality for LGBT people,” McGowan said.

In 2015, Kacsmaryk said the LGBTQ movement“has been typified by lawlessness and just a complete refusal to obey basic rule of law principles,” according to research compiled by the liberal Alliance for Justice. He also rejected the 2015 ruling in Obergefell v. Hodges that legalized same-sex marriage across the U.S., saying “traditionally and legally, we define sex according to chromosomes.”

“That’s how we ordered our marriage laws and made certain presumptions of paternity in the family code,” Kacsmaryk told a Christian blog. “All of that is cast into disarray if you declare sex irrelevant to marriage.”

Kacsmaryk has repeatedly expressed animosity toward transgender people. He took issue with the Obama-era guidance that mandated schools protect the civil rights of transgender students and allow them to access facilities that conform to their gender identity, and he opposed the extension of anti-discrimination protections to transgender people in the Affordable Care Act.

He has also represented businesses that refuse to serve LGBTQ clients, such as the owners of an Oregon bakery that refused to serve clients based on their sexual orientation.

In a series of tweets, Mike Davis, founder and president of the Article III Project, an organization supporting Trump’s nominees, slammed the criticism against Kacsmaryk as “left-wing fear-mongering.” Davis said the criticism is “unfounded” and “unfairly conflates legal advocacy with bigotry, and actually demonstrates religious bigotry toward Christians and other people of faith who wish to speak in the public square.”

“A HORRIFIC NOMINEE”

On a phone call with reporters Tuesday, Sen. Richard Blumenthal, D-Conn., said of Kacsmaryk: “In case after case at the First Liberty Institute, he has taken positions that are abhorrent to accepted values in this country.”

During his time at the First Liberty Institute, Kacsmaryk opposed the extension of anti-discrimination protections to LGBTQ people not only in health care, but also in legislation such as the Workplace Innovation and Opportunity Act, the Homeless Youth and Trafficking Prevention Act and the Violence Against Women Act of 2013 reauthorization bill, Alliance for Justice maintains.

Rep. Joseph Kennedy III, D-Mass., said the nomination of Kacsmaryk is part of Trump’s “full scale war against transgender Americans,” citing the administration’s rollback of transgender-inclusive policies in the military, public schools and homeless shelters.

“This has nothing to do with politics and gets to the very core of what our judicial system is supposed to stand for,” Kennedy said on Tuesday’s press call. “He has no place in our judicial system.”

Kacsmaryk has voiced opposition to the Equality Act, which would modify existing civil rights legislation to ban discrimination against LGBTQ people in employment, housing, public accommodations, jury service, education, federal programs and credit. He called it the “Inequality Act” and claimed the legislation would “weaponiz[e] same-sex marriage” to punish those who disagree with it.

Sen. Jeff Merkley, D-Ore., one of the sponsors of the Equality Act, took aim at Kacsmaryk on Tuesday, telling reporters he finds it “really hard to imagine anyone who is less qualified to sit on the federal bench.”

“Mitch McConnell has his own way of celebrating Pride, which is to put on the floor a horrific nominee,” he said. “Every American deserves … judges on the bench that protect their constitutional rights, not one that will try to rip them away.”

Editor's note: An earlier version of this article incorrectly listed Sen. Susan Collins as a Democrat. She is a Republican.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM