A number of Republicans who condemned Donald Trump, rejected him or withdrew their endorsements of him during the election are congratulating the president-elect after his shocking White House victory.

Mitt Romney, the 2012 GOP presidential nominee, who called Trump earlier this year “a phony, a fraud” and cast him as unfit to serve as president, wished him well on Twitter without naming him explicitly.

Best wishes for our duly elected president: May his victory speech be his guide and preserving the Republic his aim. — Mitt Romney (@MittRomney) November 9, 2016

Best wishes also for the GOP victors in the House, Senate & statehouses: may you govern with the high seriousness befitting our great nation — Mitt Romney (@MittRomney) November 9, 2016

Sen. John McCain, the 2008 GOP presidential nominee, withdrew his support for Trump after the 2005 “Access Hollywood” video surfaced of Trump making lewd comments about women. On Wednesday morning, he congratulated him.

Congrats to President-Elect Donald Trump - as Chrmn of Armed Services Cmte I'll work to confront nat'l security challenges & support troops — John McCain (@SenJohnMcCain) November 9, 2016

Rep. Jason Chaffetz, R-Utah, the chairman of the House Oversight and Government Reform Committee, who said he withdrew his endorsement of Trump but still voted for him, congratulated the president-elect.

President-elect Trump! Congratulations! — Jason Chaffetz (@jasoninthehouse) November 9, 2016

Sen. Jeff Flake, R-Arizona, said before the election that he would not support Trump or Hillary Clinton. He also called Trump “very weak and ineffective.” On Wednesday, he said he looks forward to working with the president-elect.

Congrats to Pres. Elect Trump on a big win and a gracious and healing speech. I look forward to working with him. Now, back to eating crow.. — Jeff Flake (@JeffFlake) November 9, 2016

Speaker Paul Ryan, R-Wisconsin, took a while to endorse Trump and said in early October that he would no longer defend or campaign for Trump. He has spoken to the president-elect since his victory early Wednesday.

Get Breaking News Delivered to Your Inbox

“I want to congratulate Donald Trump on his incredible victory,” Ryan said in a statement. “It marks a repudiation of the status quo of failed liberal progressive policies. We are eager to work hand-in-hand with the new administration to advance an agenda to improve the lives of the American people. This has been a great night for our party, and now we must turn our focus to bringing the country together.”

Ohio Gov. John Kasich, Trump’s last rival in the 2016 GOP primary who never publicly expressed support for his party’s nominee, canceled a speech on uniting a divided party for Thursday and congratulated Trump on Twitter.

The American people have spoken and it’s time to come together. Congratulations President-elect @realDonaldTrump. — John Kasich (@JohnKasich) November 9, 2016

President George H.W. Bush, who was rumored to have supported Clinton, congratulated Trump.