The Senate has confirmed the nomination of Eric Dreiband to serve as the United States assistant attorney general for the Department of Justice's Civil Rights Division.

According to Reuters, the Senate voted 50-47 along party lines on Thursday.

In a statement, Attorney General Jeff Sessions said, “Eric has distinguished himself as an outstanding lawyer and a committed public servant.”

According to Gay City News, Dreiband, a partner at Jones Day, defended the University of North Carolina in the school's honoring of the state's “bathroom bill,” which prohibited transgender people from using the bathroom of their choice in public buildings. He also fought for language in the Affordable Care Act that would allow medical providers to cite their faith-based objections in discriminating against LGBT people.

Under Sessions' leadership, the Justice Department has taken the position that the workplace sex discrimination protections in the Civil Rights Act of 1964 do not apply to people who are LGBT. Sessions has also prioritized defending “religious freedom.”

Trump nominated Dreiband to the post more than a year ago and his nomination was strongly opposed by some civil rights groups.