The U.S. Senate on Thursday confirmed Rick Grenell to serve as ambassador to Germany.

President Donald Trump nominated Grenell to the post in September.

Grenell's confirmation makes him the most high-profile openly gay appointee in the Trump administration.

Senate members voted mostly along party lines, with 56 senators in favor and 42 opposed.

According to the Washington Blade, six Democrats – Senators Joe Donnelly of Indiana, Doug Jones of Alabama, Heidi Heitkamp of North Dakota, Joe Manchin of West Virginia, Jon Tester of Montana and Claire McCaskill of Missouri – joined all Republicans present in voting for Grenell's confirmation.

Grenell served as a US spokesman at the United Nations during former President George W. Bush's administration. He worked on Arizona Senator John McCain's unsuccessful presidential campaign. In 2012, he joined the presidential campaign of Mitt Romney, serving as the Republican nominee's foreign policy spokesman, but resigned less than two weeks later amid growing pressure from social conservatives over his sexual orientation. He currently appears on Fox News Channel as a foreign affairs commentator and was one of the president's earliest foreign policy supporters.

According to The Atlantic, Grenell, 50, has been in a 15-year relationship with Matt Lashley, a graduate from Jerry Falwell's Liberty University who, like Grenell, identifies as a conservative Christian.

Grenell is also a cancer survivor, beating a diagnosis of non-Hodgkin's Lymphoma in 2013.