The U.S. Senate on Thursday confirmed Mike Pompeo as the next secretary of state.

According to The Washington Post, Pompeo won confirmation on a 57-42 vote.

President Donald Trump nominated Pompeo to serve as secretary of state last month after he fired Rex Tillerson.

LGBT rights groups criticized the Senate vote.

“Senators who cast their vote to confirm Mike Pompeo showed complete disregard for the global LGBTQ community by ignoring his ties to anti-LGBTQ hate and extremism,” GLAAD President and CEO Sarah Kate Ellis said in a statement.

“Mike Pompeo’s long-standing opposition to LGBTQ equality and lack of diplomatic experience makes him a poor choice to lead our nation’s diplomatic efforts,” HRC President Chad Griffin said in a statement. “The State Department has a crucial role to play in advancing human rights – a role which was already significantly eroding under Rex Tillerson. Now that he has been confirmed by the U.S. Senate, LGBTQ people around the world will need him to stand up for LGBTQ human rights.”

Previous to serving as director of the Central Intelligence Agency (CIA), Pompeo served six years in the U.S. House as a Republican from Kansas. During this time, Pompeo co-sponsored bills that would allow states not to recognize marriage equality and allow organizations and businesses to discriminate against LGBT people. He also opposed repeal of Don't Ask, Don't Tell, the military policy which prohibited gay troops from serving openly.

During his Senate confirmation hearing, Pompeo reiterated his opposition to same-sex marriage and refused to answer whether he believes being gay is a “perversion.”

(Related: Mike Pompeo won't say whether he believes being gay is “perversion.”)