(Photo: Chip Somodevilla via Getty Images)

WASHINGTON — The Senate on Thursday narrowly confirmed Rep. Jim Bridenstine (R-Okla.), a former Navy pilot with no scientific credentials and who doesn’t believe humans are primarily to blame for the global climate crisis, to lead NASA.

Bridenstine will become the first elected official to hold the NASA administrator job. He joins a Cabinet already loaded with people who question the near-universal scientific consensus that climate change is real and that human activity is the primary cause.

The final vote ― which was 50-49 along party lines ― came one day after the Senate narrowly advanced Bridenstine’s nomination, thanks to an about-face from Sen. Marco Rubio (R-Fla.) and a key vote from Sen. Jeff Flake (R-Ariz.). Rubio, who in September told Politico that he worried about Bridenstine’s nomination “could be devastating for the space program,” said in a statement Wednesday that he decided to support the nominee in order to avoid “a gaping leadership void” at NASA.

Today, the U.S. Senate voted to confirm Jim Bridenstine as our 13th administrator. Once sworn in, he will oversee our ongoing mission of exploration and discovery. Welcome to the NASA family! pic.twitter.com/r1Eiyb13PY — NASA (@NASA) April 19, 2018

Much like the procedural vote on Wednesday, which was temporarily deadlocked at 49-49, Thursday’s confirmation ultimately hinged on Flake, who voted in favor only after a bit of drama that included a long discussion with Senate Majority Leader Mitch McConnell (R-Ky.) and stepping out for a phone call, as CNN’s Manu Raju reports.

Bridenstine will replace Robert Lightfoot Jr., who has been serving as acting administrator since previous NASA administrator, Charles Bolden Jr., resigned from his post in January.

In a statement following Thursday’s vote, Bridenstine said he is humbled by the opportunity. “I look forward to working with the outstanding team at NASA to achieve the President’s vision for American leadership in space,” he said.

Story continues

The Senate confirmation comes more than seven months after President Donald Trump tapped Bridenstine for the post. Democrats skewered Bridenstine during the confirmation process, pegging him as “extreme” and unqualified to oversee a scientific agency with an annual budget of more than $18 billion.

Echoing previous statements, Sen. Bill Nelson (D-Fla.) said on the Senate floor Wednesday that he finds Bridenstine’s behavior in Congress “as divisive as any in Washington.” And he called Bridenstine’s previous comments about climate change “troubling.”

Sen. Brian Schatz (D-Hawaii) said before Thursday’s vote that it is “downright dangerous” to put someone without the appropriate expertise in charge of NASA.

“And quite frankly it is even more frightening to have a leader who has made a career out of ignoring scientific expertise,” he said.

There is simply no excuse for voting for someone so unqualified to run NASA. They aren’t even bothering to make the argument that he will be a good administrator. They are just voting yes and getting out of town. For me this is a good reminder that elections have consequences. — Brian Schatz (@brianschatz) April 19, 2018

In a June 2013 speech, Bridenstine peddled a debunked argument made by climate change skeptics, claiming that global temperatures “stopped rising 10 years ago.” He said “the people of Oklahoma are ready to accept” an apology from then-President Barack Obama for what Bridenstine called a “gross misallocation” of funds for climate change research instead of weather forecasting.

Critics have also pointed to Bridenstine’s history of opposing equal rights for same-sex couples ― in 2013, he suggested LGBTQ people are sexually immoral ― and voiced concern about his ability to manage an agency of more than 17,000 employees. Bridenstine has no formal background in science or engineering.

The former Navy Reserve pilot previously served as executive director of the Air and Space Museum & Planetarium in Tulsa, Oklahoma. During his tenure, the nonprofit suffered financial losses, and an investigation by the Project On Government Oversight found that Bridenstine used the nonprofit’s resources to benefit a company he co-owned, according to a report from The Daily Beast this week.

Republican lawmakers, including Sens. Ted Cruz (Texas) and James Inhofe (Okla.), have flocked to Bridenstine’s defense.

On Wednesday, Cruz called Bridenstine a “strong leader” and said he could think of few people more inspirational or qualified. And he blasted “cynical politicians” for “attempting to malign his character.”

.@NASA will have that strong leader in Jim Bridenstine. Having spent his entire adult life in public service, first in combat as a fighter pilot, then in the House of Representatives, he is a principled and effective leader who I count as a dear friend. pic.twitter.com/RSjFg2muAU — Senator Ted Cruz (@SenTedCruz) April 19, 2018

In a Twitter post, Inhofe said Bridenstine “has the experience to take our space program to new heights b/c of his background as an aviator, passion for space & work to modernize our nation’s space program.”

At his confirmation hearing in November, Bridenstine said NASA was “at a critical time in its history” and that he would build off the hard work of the previous administration.

“Humanity is ready to go to deep space for the first time in 45 years,” he said.

This article has been updated to include Bridenstine’s statement and additional details about the final vote.

Love HuffPost? Become a founding member of HuffPost Plus today.

This article originally appeared on HuffPost.