President Donald Trump’s endorsement of Mitt Romney’s U.S. Senate campaign in Utah may have come as a surprise to some given their complicated history.

Trump and Romney have had a roller-coaster relationship for years, often throwing insults at each other in times of distress — and exchanging pleasantries when mutually beneficial.

Romney, the 2012 Republican presidential nominee who is now running to replace retiring Utah Republican Sen. Orrin Hatch, famously called Trump a “phony” and a “fraud” during Trump’s presidential campaign. Trump has repeatedly slammed Romney, the former Massachusetts governor, for his failed 2012 campaign, despite endorsing Romney that year.

Still, Trump considered Romney as a possible Secretary of State before choosing Rex Tillerson, and now Trump has endorsed Romney’s political comeback.

Here’s a history of Trump and Romney’s rocky relationship.

February 2012: Trump endorses Romney

Republican presidential candidate, former Massachusetts Gov. Mitt Romney (L) and Donald Trump shake hands during a news conference held by Trump to endorse Romney for president at the Trump International Hotel & Tower Las Vegas February 2, 2012 in Las Vegas, Nevada. Ethan Miller—Getty Images

Trump endorsed then-GOP presidential candidate Romney’s campaign back in February 2012. “Mitt is tough, he’s sharp, he’s smart,” Trump said at the time.

“Donald Trump has shown an extraordinary ability to understand how the economy works,” Romney said, adding, “it means a great deal to me to have the endorsement of Mr. Trump.”

October and November 2012: Trump boosts Romney on Twitter

As the 2012 presidential election approached, Trump took to Twitter, calling on Americans to vote for Romney, posting videos and quotes from the candidate and lauding his performance in debates against former President Barack Obama.

November 7, 2012: Trump says Romney blew the election

After Romney’s loss to Obama, Trump tweeted that Romney “is a good man but he just never connected with the people.”

October 2014: Trump says Romney shouldn’t run again

Amid rumors that Romney would run for president again in 2016, Trump tweeted that Romney “had his chance and blew it.”

July 2015: Romney criticizes Trump’s campaign launch

After Trump announced he would run for president, Romney criticized Trump’s remarks on Mexico and undocumented immigrants — saying that the comments hurt the Republican Party.

“I think he made a severe error in saying what he did about Mexican-Americans,” Romney said, according to CNN.

Days later, Romney then slammed Trump for going after Arizona Republican Sen. John McCain’s military record.

Trump responded by pointing to Romney’s loss to Obama in 2012.

September 30, 2015: Romney says Trump won’t win

In a speech at Georgetown University, Romney said he “would have never predicted” that Trump would be leading his party, according to the Washington Post. He also predicted Trump would not become the Republican presidential nominee.

He added that while he found Trump’s popularity to be a positive for the party, his rhetoric was a negative.

“The negative side is that he’s said some things that he described the other day as being ‘childish,'” Romney said. “I’m afraid he brought attention to [immigration] in a way that was not productive and not appropriate in saying the things he did about Mexican-American immigrants.”

Trump later responded on Twitter.

February 24-25, 2016: Romney wants Trump’s tax returns

Before Trump secured the GOP nomination, Romney said the remaining three Republican candidates should release their tax returns, noting that there may be a “bombshell” in Trump’s.

Trump then responded by saying Romney’s “tax returns made him look like a fool,” and pointed to his endorsement of the 2012 candidate, saying Romney “was so awkward and goofy” back then.

The war of words then continued on Twitter on Feb. 25, with Trump calling Romney a “dope” and sharing a photo in which he said he was signing “a recent tax return.”

Romney retorted with the hashtag “#WhatIsHeHiding.”

February 29, 2016: Romney says Trump’s hesitation to disavow the KKK is ‘disqualifying’

Just days after their feud over tax returns, Romney criticized Trump’s failure to immediately condemn former Ku Klux Klan leader David Duke.

March 3, 2016: Romney makes a last-ditch effort to stop Trump

In a wide-ranging, scathing speech against the then-presidential candidate, Romney criticized Trump on everything from his temperament to his economic plan to his foreign policy experience.

“Here’s what I know. Donald Trump is a phony, a fraud,” Romney said at the University of Utah. “His promises are as worthless as a degree from Trump University. He’s playing the American public for suckers: He gets a free ride to the White House and all we get is a lousy hat.”

Just hours after Romney’s speech, Trump responded at a rally in Maine by pointing to his endorsement of Romney in 2012. “He was begging for my endorsement,” Trump said. “I could have said, ‘Mitt, drop to your knees.’ He would’ve dropped to his knees.”

March 2016: Trump says Romney ‘choked’

Trump double-downed on his criticism of Romney, calling him a “failed presidential candidate” who “choked and let us all down.”

October 8, 2016: Romney condemns Trump’s ‘vile degradations’ after Access Hollywood tape

After the Washington Post published the infamous 2005 Access Hollywood tape, in which Trump bragged about groping women without their consent, Romney took to Twitter to blast the presidential candidate.

November 9-13, 2016: Romney congratulates Trump on winning

Romney tweeted well-wishes to Trump after he won the 2016 presidential election.

Days later, Trump said Romney called to congratulate him for his win.

November 19, 2016: Romney visits Trump

President-elect Donald Trump and Mitt Romney walk out after a meeting at the Trump National Golf Club Bedminster clubhouse at Trump National Golf Club Bedminster in Bedminster Township, N.J. on Saturday, Nov. 19, 2016. The Washington Post—The Washington Post/Getty Images

Romney visited the Trump National Golf Course in Bedminster, New Jersey, where the then-president elect was considering candidates to fill his Cabinet.

At the time, Vice President-elect Mike Pence told Fox News Sunday the two politicians had a “good meeting.”

“It was a warm and a substantive exchange,” Pence said, confirming Romney’s consideration for the role of Secretary of State.

November 29, 2016: Trump and Romney have dinner

President-elect Donald Trump and Mitt Romney dine at Jean Georges restaurant, November 29, 2016 in New York City. President-elect Donald Trump and his transition team are in the process of filling cabinet and other high level positions for the new administration. Drew Angerer—Getty Images

Romney and Trump dined in New York City as Trump considered Romney for one of his top Cabinet positions. Romney told reporters after the meeting that Trump was “the very man who can lead us,” according to Reuters.

“We had another discussion about affairs throughout the world and these discussions I’ve had with him have been enlightening, and interesting, and engaging,” he said at the time. “I’ve enjoyed them very, very much.”

August 18, 2017: Romney condemns Trump’s response to Charlottesville

After a white nationalist rally ended with the death of a counter-protester in Charlottesville, Va., Romney criticized Trump’s response, demanding that the president apologize.

“Whether he intended to or not, what [Trump] communicated caused racists to rejoice, minorities to weep, and the vast heart of America to mourn,” Romney said in a Facebook post. “The president must take remedial action in the extreme. He should address the American people, acknowledge that he was wrong, apologize. State forcefully and unequivocally that racists are 100% to blame for the murder and violence in Charlottesville.”

In Trump’s response to the violent event, he said there is “blame on both sides.”

February 2018: Trump endorses Romney

Trump endorsed Romney for his U.S. Senate bid, saying he would make a “great Senator.” Romney — who had previously said he would not have accepted Trump’s 2012 endorsement if he knew what he knows now about Trump — thanked Trump for the endorsement.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.