Sen. Rand Paul said Monday he would support CIA Director Mike Pompeo as the next secretary of state — virtually guaranteeing that he would be confirmed by the Senate.

“I just finished speaking to @realDonaldTrump, after speaking to him several times today. I also met with and spoke to Director Pompeo,” the Kentucky Republican said in one of a series of tweets explaining his change of heart.

“After calling continuously for weeks for Director Pompeo to support President Trump’s belief that the Iraq war was a mistake, and that it is time to leave Afghanistan, today I received confirmation the Director Pompeo agrees with @realDonaldTrump,” he wrote.

“President Trump believes that Iraq was a mistake, that regime change has destabilized the region, and that we must end our involvement with Afghanistan,” he continued.

“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.”

His announcement came as the Senate Foreign Relations Committee was set to vote on Pompeo’s nomination.

He faced a tough fight there, but with Paul’s support and the backing of several Democrats he will be able to win a vote by the full Senate to replace the fired Rex Tillerson as the country’s top diplomat.