Senate Republicans voted on Wednesday to appoint controversial federal judge Matthew Kacsmaryk, who has a history of speaking out against LGBT groups and opposing reproductive rights.

As HuffPost reported, the Senate voted along party lines to confirmed 42-year-old Kacsmaryk to serve on the U.S. District Court for the Northern District of Texas. Every Democrat present voted against his appointment, while every Republican — other than Susan Collins, of Maine — voted for him.

Kacsmaryk’s bid for the federal judgeship faced fierce opposition from LGBT and reproductive rights groups, which tried to shed light on his past controversial comments regarding homosexuals and transgender people. As the report noted, he had signed a letter calling being transgender a “delusion” and also said that homosexuality was “disordered,” The Washington Post noted.

HuffPost added that the new federal judge fought back against protections for LGBT people in employment, housing, and health care. He had also ruled against reproductive rights, opposing the employer contraceptive mandate in the Affordable Care Act.

Before being appointed to the federal post, Kacsmaryk has served as deputy general counsel at First Liberty Institute, a Texas-based non-profit that works on religious liberty issues, which the Advocate notes usually meant opposing LGBT and reproductive rights. He represented the Oregon baker who refused to bake a wedding cake for a same-sex couple and was sued for discrimination.

Kascmaryk’s appointment drew sharp pushback from a number of civil rights advocacy groups, including the Alliance for Justice. The agency’s president, Nan Aron, released a statement saying that his appointment will cause suffering to millions of vulnerable people in Texas and will now have the power to cut off civil rights to these groups.

The Senate voted 52 to 46 today to confirm Matthew Kacsmaryk as a federal judge. Kacsmaryk drew harsh criticism from dozens of civil rights groups who questioned his ability to stay impartial given past writings about LGBTQ people.https://t.co/IgEjAU9nEk — Jake Holland (@jakewholland) June 19, 2019

“Kacsmaryk harbors strong hostility to LGBTQ people and to women’s rights. Now, not only will he have the opportunity to curtail equal rights for millions within these communities, but individual women and LGBTQ people who come into his courtroom seeking justice will have to face a judge who has expressed contempt for them,” Aron said. “As a judge, Matthew Kacsmaryk is going to ruin lives, and there is no way to minimize that very sad fact.”

Critics have taken aim at Senate Republicans, and Senate Majority Leader Mitch McConnell in particular, for thwarting Barack Obama’s attempts to seat judges during his time in office and now moving at a rapid pace to fill those vacancies under President Donald Trump.