After weeks of declaring he wouldn't support Mike Pompeo for secretary of state, Sen. Rand Paul abruptly flipped positions and tweeted an endorsement for the Trump nominee just minutes before his committee was set to vote on the matter.

Before that, the Senate Foreign Relations Committee was expected to vote against the nomination, which would have been the first time in nearly a century that a secretary of state was rejected by the panel. Now Pompeo's fate in the committee is less certain.

In the last-minute tweet, Sen. Paul, a Kentucky Republican who had previously vehemently opposed Pompeo’s nomination, said he had spoken directly with President Trump and believed Pompeo, like Trump, now believed the Iraq War to be a mistake.

“Having received assurances from President Trump and Director Pompeo that he agrees with the President on these important issues, I have decided to support his nomination to be our next Secretary of State,” Paul tweeted just moments before the committee was scheduled to meet for the vote.

Paul had told reporters soon after Pompeo’s nomination was announced in March that he would oppose the appointment due to Pompeo’s support for the Iraq War and his overall hawkishness.

Republican Sen. Jeff Flake, who also sits on the committee, is still expected to vote against Pompeo, which would split the vote evenly. Either way, Pompeo’s nomination will proceed to the Senate floor, where it's likely he'll squeeze through with the required majority. So far three Democrats up for re-election in Trump states — Sen. Heidi Heitkamp of North Dakota, Sen. Joe Manchin of West Virginia, and Sen. Joe Donnelly of Indiana — have publicly endorsed him, helping to close any gap that might be left by dissenting Republicans. Sen. Claire McCaskill of Missouri and Sen. Jon Tester are also facing re-election in red states in 2018 but have not yet revealed their positions.

The White House over the past week repeatedly pushed the Senate Foreign Relations Committee to accept Pompeo’s nomination, and on Monday, White House press secretary Sarah Huckabee Sanders told reporters it would be “absolutely outrageous” for Pompeo’s confirmation to not move quickly through the Senate, calling him “extremely qualified.”

Hours before President Trump also chastised Democrats for what he said was an effort to obstruct the approval process.

"Hard to believe Obstructionists May vote against Mike Pompeo for Secretary of State. The Dems will not approve hundreds of good people, including the Ambassador to Germany. They are maxing out the time on approval process for all, never happened before. Need more Republicans!" the president tweeted.

Pompeo is known for his aggressive foreign policy stances, including his opposition to the 2015 Iran nuclear deal and his support of regime change in North Korea. Before he began serving as the director of the CIA in January 2017, he was a three-term congressman representing Kansas’s 4th district; before that he spent five years in the Army. That military service record came under scrutiny last week after it was revealed he did not deploy to serve in the Gulf War, despite numerous articles claiming he did, but rather served in the Army during that same time period.