Screen Shot 2014-12-16 at 11.39.24 PM

U.S. District Judge Robert Pitman

The U.S. Senate has confirmed Robert Pitman to the U.S. District Court for the Western District of Texas, making him the first openly gay federal district court judge in Texas, according to reports by LGBTQNation.com.

The Western District court had been vacant for six years. The vote to confirm Pitman came late Tuesday evening, Dec. 16.

U.S. Sen. Ted Cruz, a Texas Republican who has never been a friend of the LGBT community, is getting credit for Pitman being confirmed — but not because Cruz suddenly had a change of heart on LGBT issues.

In an effort to force a vote on what he called President Obama’s “illegal executive amnesty” for immigrants, Cruz and Sen. Mike Lee, R-Utah, on Friday, Dec. 12,  scuttled a bipartisan agreement that would have prevented weekend votes in the Senate. The ban on weekend votes would have meant the Senate would have run out of time before being able to vote on confirming more than a dozen of the president’s judicial and executive nominees, including Pitman, who likely would not have been confirmed if they had been forced to wait until next year when the GOP will control the Senate.

But when Cruz and Lee sidelined the agreement, that opened the door for current Senate Majority Leader Harry Reid, D-Nev., to call the Senate back into session on Saturday and get those votes through.

Pitman, a former magistrate judge in Austin, had led the San Antonio-based federal prosecuting office since 2011 when he became the first openly gay U.S. attorney in Texas. He had also served as an assistant U.S. attorney in the same district from 1990 to 2003.