The Senate confirmed Richard Grenell, a gay Republican, as the U.S. ambassador to Germany on Thursday, filling the high-profile diplomatic position just in time for a White House visit this week by German Chancellor Angela Merkel.

Grenell, who was confirmed by a vote of 56-42, was the first openly gay ambassador nominated by President Donald Trump.

Richard Grenell arrives at Trump Tower in New York on Dec. 12, 2016. Richard Drew / AP

Gregory T. Angelo, president of LGBTQ conservative group Log Cabin Republicans, called Grenell's confirmation "historic."

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“He has now officially become the highest ranking openly gay official ever in a Republican administration," Angelo said in a statement sent to NBC News. "Despite the interminable delays of Democrats hell-bent on standing on the wrong side of history, today the United States Senate confirmed a gay nominee not ‘in spite of’ Republicans, or ‘with Republican support,’ but because of Republican support.”

Earl Fowlkes, chairman of the Democratic National Committee's LGBT Caucus, called Grenell's appointment a "good sign" and a show of "political wisdom" on the part of the Trump administration, which he said has been "hostile" toward the LGBTQ community.

"Having a Republican president appoint an openly gay man as an ambassador to one of our important allies such as Germany speaks volumes to the influence that the LGBTQ [community] has in politics in the United States," Fowlkes told NBC News via email.

Grenell, a former Fox News commentator and spokesman for the U.S. mission to the United Nations, has been a controversial figure due to his outspoken views on Twitter. He has come under fire in the past for tweets targeting women, including Hillary Clinton, Michelle Obama, Rachel Maddow and Callista Gingrich.

Sen. Bob Menendez, D-N.J., ranking member of the Senate Foreign Relations Committee, voted against Grenell's confirmation and gave a six-minute speech on the Senate floor — which included reading a number of Grenell's past tweets — describing why he thinks Grenell is unfit.

“Mr. Grenell’s derogatory comments about women are simply unacceptable for anyone to make in public, let alone a diplomat," Menendez said in his speech. “Not only do these tweets show bad judgment, they show us who Mr. Grenell really is and how comfortable he is publicly contributing his own brand of toxic political discourse."

The Victory Institute, which trains and advocates for openly LGBTQ leaders at all levels of government, issued a statement to NBC News saying it hopes "Grenell will use his position to defend LGBTQ people at home and abroad."

"Ambassador-designate Grenell could be a voice for equality within the Trump administration," the statement continued. "We hope this reflects a newfound understanding within the Trump administration that there are hundreds of openly LGBTQ people who are talented, believe in equality for all Americans, and are ready to serve our country.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM