Sen. Cory Booker (D-NJ) had positioned himself as a champion of gay rights in his opposition to Mike Pompeo to become secretary of state, then on Thursday he voted against Richard Grenell, the Trump administration’s first prominent openly-gay nominee, for U.S. ambassador to Germany.

Grenell’s nomination was confirmed by the Senate anyway, in a 56 to 42 vote, making him the highest-ranking openly gay official in a Republican administration ever.

During Pompeo’s confirmation hearing earlier this month, Booker attacked him over his position that gay persons should not be married, despite Pompeo telling them that as CIA director he treated married gay couples at the agency the same as anyone and believed they should be treated equally.

Booker launched the attack on Pompeo despite having endorsed then-Sen. Barack Obama (D-IL) for president in 2008, even though Obama held the same view on gay marriage as Pompeo at the time.

“You’re going to be representing this country and their values abroad in nations where gay individuals are under untold persecution, untold violence,” Booker lectured Pompeo at the hearing on April 12.

“And I do not necessarily concur that you are performing the values of our nation when you can’t even — when you believe that there are people in our country that are — are — are perverse,” he said.

The exchange was covered in the press, where Booker was portrayed as tough. He is widely considered to be a presidential aspirant for the Democratic Party.

Earlier this year, Booker went on what some outlets characterized as a rant against Kirstjen Nielson, Trump’s nominee for secretary of the Department of Homeland Security. He claimed he had “tears of rage” after Trump allegedly referred to some nations as “sh-thole” nations.

But Booker’s hypocrisy was on full display on Thursday, after he opposed Pompeo’s confirmation based on his gay marriage views, and then opposed the confirmation of Richard Grenell as U.S. ambassador to Germany.

As an ambassador, Grenell would be doing exactly what Booker stated was so important — representing America at a time of “untold persecution.”

Booker had opposed Grenell’s nomination twice in Senate Foreign Relations Committee business meetings — once in October, and another time in January, but made no public statement on doing so.

On Thursday, Booker voted against Grenell’s confirmation, along with 41 other Democrats and Independents.

The opposition came despite Grenell’s extensive foreign policy experience.

Grenell served as the former spokesman for National Security Adviser John Bolton, when he was the U.S. ambassador to the United Nations under President George W. Bush.

He has also served as a political adviser and spokesman for Republican politicians and campaigns, including Sen. John McCain (R-AZ) during his 2000 presidential bid and former Massachusetts Gov. Mitt Romney’s bid in 2012.

Only red state Democrats, including some facing tough reelection fights, crossed the aisle and voted to confirm Grenell. That included Sens. Joe Donnelly (IN), Heidi Heitkamp (ND), Doug Jones (AL), Joe Manchin (WV), Claire McCaskill (MO), and Jon Tester (MT).

Gregory T. Angelo, the president of Log Cabin Republicans, who called Democratic senators to secure support for Grenell, said some Democrats were posturing for future presidential runs.

“There’s really no reason for Democrats to continue to stand in the way of his nomination,” he told Metro Weekly, Washington, D.C.’s premier LGBTQ publication on Wednesday.

“There are Democratic senators who have informed me and our office that they would be opposing Grenell. Most of them are grandstanding Democrats with quixotic intentions of challenging Donald Trump for the presidency in 2020,” he said.