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.