WASHINGTON — The Senate Foreign Relations Committee approved CIA Director Mike Pompeo as secretary of State on party lines Monday after a Republican holdout changed his mind at the last minute, avoiding an embarrassing defeat for President Donald Trump.

Sen. Rand Paul of Kentucky had vowed to oppose Pompeo, but Paul tweeted shortly before the vote that after speaking repeatedly to the nominee and Trump he was convinced Pompeo now agreed with the president that "the Iraq war was a mistake and it is time to leave Afghanistan," two of the congressman's key concerns.

The full Senate already appeared on track to confirm Pompeo's nomination this week after two Senate Democrats, both facing re-election battles in states that Trump won handily, offered support earlier Monday. The Senate traditionally gives broad leeway to a president's Cabinet picks.

But Paul's reversal meant Pompeo, 54, also got the approval of the Senate committee, thus keeping its record of approving every president's nominee for secretary of State. Nominations were not routinely submitted to the panel until the 20th century.

The final vote was delayed when Sen. Johnny Isakson, R-Ga., failed to appear at the hearing, leading to a 10-10 tie along party lines. After a brief recess, Sen. Chris Coons, D-Del., then agreed to withdraw his vote against, so the final tally was 10-9 in favor.

Born in Orange, Calif., Pompeo attended the U.S. military academy at West Point and Harvard Law School. He was elected to the House in 2010 as a tea party Republican from Kansas, and served three terms until he joined the Trump administration.

Trump has said he and Pompeo were "on the same wavelength" and shared a worldview _ unlike his first secretary of State, Rex Tillerson. Trump fired Tillerson last month via Twitter.

Sen. Bob Corker, R-Tenn., chairman of the Foreign Relations Committee, praised Pompeo before the vote. "There is probably no one in the United States who knows more about what is going on in the world today," he said, stressing Pompeo's "very good relationship" with Trump.

Trump had excoriated Pompeo's opponents Monday morning on Twitter as "Obstructionists," claiming that Democrats "will not approve hundreds of good people" by "maxing out" the confirmation process.

White House Press Secretary Sarah Huckabee Sanders went further, questioning the patriotism of Democrats.

"Look, at some point, Democrats have to decide whether they love this country more than they hate this president," she said on Fox News. "And they have to decide that they want to put the safety and the security and the diplomacy of our country ahead of their own political games."

Republican lawmakers blamed Pompeo's difficulties on political partisanship in an election year, noting that many of the Democrats who oppose him now backed his nomination last year to head the CIA. He was confirmed by a vote of 66-32.

Democrats argued that the job of America's top diplomat _ fourth in line to the presidency _ is vastly different from CIA chief. They voiced concern that Pompeo would advocate for military force, not diplomacy, and would fail to serve as a counterbalance to Trump.

Sen. Robert Menendez of New Jersey, ranking Democrat on the Foreign Relations Committee, argued Monday that Pompeo was unqualified for the job.

"This suggestion that there is partisanship just because we don't support a candidate is ridiculous," Menendez said. He said Pompeo, in his confirmation hearing last week, gave contradictory answers that were not always "forthright" and exhibited a "lack of depth of knowledge" on key global hot spots.

Democrats and other opponents have criticized some of Pompeo's past statements as anti-Muslim and prejudiced against gays, lesbians, bisexuals and transgender people. Pompeo told the Senate committee last week that if he is confirmed, he would defend gay rights and respect minorities.

Menendez also said he was disillusioned that Pompeo had concealed, in private conversations, his then-secret trip to North Korea over the Easter weekend.

Pompeo met with ruler Kim Jong Un to help plan a proposed summit with Trump by mid-June. The White House hopes to persuade Kim to abandon his nuclear arsenal, an unlikely proposition. It was Kim's first meeting with a U.S. official.

Despite the Democratic opposition on the Foreign Relations Committee, other Senate Democrats lined up in Pompeo's corner, all but assuring his confirmation.

On Monday, Sen. Joe Manchin III, D-W.Va., and Sen. Joe Donnelly, D-Ind., joined Sen. Heidi Heitkamp, D-N.D., to announce support for Pompeo. Their votes should be enough to guarantee he squeaks through the narrowly divided Senate.

"After meeting with Mike Pompeo, discussing his foreign policy perspectives, & considering his distinguished time as CIA Director & his exemplary career in public service, I will vote to confirm Mike Pompeo to be our next Secretary of State," Manchin tweeted.

Their announcements also may push other moderate Democrats in Trump-friendly states to show they are willing to sometimes support the president. Pompeo's backers are hoping to also win over Sens. Doug Jones of Alabama and Claire McCaskill of Missouri.

Like Trump, Pompeo has voiced vehement opposition to the landmark 2015 deal that curbed Iran's nuclear development efforts.

Trump has threatened to abandon the accord on May 12, when the next deadline for sanctions renewal comes up. In his confirmation hearing, Pompeo said he would rather "fix" the deal by revising its terms than scrap it altogether.

Iran has rejected any attempts to rewrite the deal, and over the weekend, its foreign minister, Mohammad Javad Zarif, said Tehran might resume its nuclear activities if Trump pulls out.

Tillerson, a former CEO of Exxon Mobil, trimmed the State Department budget and staff during his tenure, demoralizing the diplomatic corps. Numerous senior positions remain empty.

In his Senate confirmation hearing, Pompeo vowed to rebuild staffing and morale.