Washington (CNN)It was another dramatic hour -- and history was made -- in the Senate on Thursday.
Trump's NASA nominee is confirmed after Senate drama
The lawmakers narrowly confirmed Rep. Jim Bridenstine to be the next NASA administrator after Sen. Jeff Flake, R-Arizona, who held his vote back for several minutes while he huddled with GOP leaders on the floor, finally voted yes.
The vote was 50-49. Republicans control 51 seats in the chamber, but Arizona GOP Sen. John McCain has been in Arizona recovering from cancer treatment, meaning that there were 99 senators voting. While Vice President Mike Pence has the ability to break a tie, he wouldn't have been able to overrule Flake's would-be no vote in this instance.
Democrats strongly oppose Bridenstine, President Donald Trump's nominee to head the space agency, who they believe is not a "space professional," in the words of Florida Democratic Sen. Bill Nelson.
Democrats also complained about his views on climate change.
"NASA is one of the few remaining areas that has largely avoided the bitter partisanship that has invaded far too many areas of government and our society today," Nelson said in a floor speech.
Flake initially voted against Bridenstine Wednesday on a procedural vote but then switched to yes after securing a meeting with CIA Director Mike Pompeo, who has a confirmation vote next week to become secretary of state.
Sen. John Cornyn, a Texas Republican and the No. 2 GOP leader, explained that the Flake had wanted a meeting with Pompeo about an unrelated issue -- travel restrictions to Cuba, an issue Flake has championed for years.
In another historic twist, Sen. Tammy Duckworth, an Illinois Democrat who gave birth to a baby girl 10 days ago, returned to the chamber for the first time since leaving on unofficial maternity leave. One day before, the tradition-bound Senate changed its rules to allow newborn babies onto the floor.
Duckworth, a disabled veteran, arrived with her newborn Maile on her lap, as she came to the floor in a wheelchair. They were met with applause and doting senators, including leaders Mitch McConnell and Chuck Schumer, who swarmed around them.
During the vote, it was clear Republican leadership wasn't sure if the nominee would get the votes needed to be confirmed. McConnell and Cornyn were seen looking concerned by the desk where the votes are tallied in the Senate chamber.
At one point, Flake walked into the Senate chamber, didn't speak to any of his colleagues, and then walked out after a few minutes without smiling, before finally voting.
He did, however, linger after his vote to see Duckworth's newborn baby.
Shortly before the Thursday vote, Flake wouldn't say whether his issues had been resolved, leaving a question mark about Bridenstine's fate as the vote got underway.
When walking with a group of senators after he cast his vote, Flake didn't elaborate on why he made his decision, but said that occasionally when you have leverage on a tight vote, you use it.
"When you have some leverage when it's a close vote, every senator does that from time to time," Flake told reporters.
He said he spoke to Pence for a bit when he disappeared off the floor but he wouldn't say what it was about or what Pence wanted. Pence's motorcade rolled to Capitol Hill in case he needed to break a tie, unlikely scenario given the odd number of senators who were voting, though it was not clear whether Duckworth would vote until Thursday afternoon.
While Flake used his vote as leverage on Cuba, he also said he was not "enthusiastic" about Bridenstine to lead NASA.
Another Republican, Sen. Marco Rubio of Florida, had previously expressed concerns about Bridenstine but voted for him in the end.
In a floor speech Thursday, Rubio explained he thought Trump deserved to have the people he wants in top government posts.