Over the last couple of weeks, Sen. Ted Cruz has traveled Texas, coming home to answer the campaign challenge issued by Beto O'Rourke, the Democratic U.S. House member from El Paso facing the incumbent in November. Cruz hasn't, as O'Rourke has, visited each of Texas' 254 counties, but he's made it clear that he knows he's in a competitive race, calling for five debates with O'Rourke and warning his supporters of the intensity Democrats are showing ahead of the midterms.

"This is not an ordinary cycle," Cruz told a gathering of conservatives in Austin earlier this month. "The far left is filled with anger and rage, and we underestimate that anger at our peril."

O'Rourke, who has consistently polled within 10 points of Cruz, has forced the senator to shore up his base or risk depressed turnout in November. As part of that effort, Cruz has done something that would've been impossible to foresee two years ago when he ran for president. He's embraced the man who beat him for the Republican nomination, Donald Trump, going so far as to ask the president to come campaign for him in Texas.

As Trump and Cruz continue to maintain their unlikely peace, let's take a look at the winding path that's led them here.

1. Cruz and Trump's relationship actually started out amicably. — In the very early days of the 2016 campaign, Cruz actually did his best to stay out of the Trump steamroller's way.

After NBC and Univision cut Trump from the reality show he created, The Apprentice, Cruz came to his opponent's defense during the summer of 2015.

“When it comes to Donald Trump, I like Donald Trump. I think he’s terrific. I think he’s brash. I think he speaks the truth,” Cruz said during an interview on Fox News' Fox and Friends on June 30 that summer. “And I think NBC is engaging in political correctness that is silly and that is wrong."

Cruz accused the media of trying to throw him and Trump into a "cage match" and insisted that he wasn't going to take the bait.

2. Trump begins throwing out the bait himself. — By February 2016, Trump was fully committed to an unconventional war against everyone else in the GOP primary field. On Feb. 8, he effectively called Cruz a "pussy" during a rally in New Hampshire.

As Trump criticized Cruz for his failure to support, as Trump does, the widespread use of torture while interrogating prisoners of war, a woman in the crowd shouted that the senator was a "pussy."

Trump feigned outrage.

"She said —. I never expect to hear that from you again!" he told the crowd. "She said: 'He's a pussy.' That's terrible."

3. Spouses become fair game. — In March 2016, Trump began taking shots at Heidi Cruz, the senator's wife, following the social media publication of an ad featuring a nude photo of Trump's wife, Melania. The ad, targeted at Utah primary voters by Make America Awesome, an anti-Trump political action committee founded by GOP strategist Liz Mair, shows Trump's wife lying on a rug on Trump's plane. It was taken for a GQ profile of Melania Trump in 2000.

Cruz denied having anything to do with the ad. That didn't stop Trump from being pissed.

Lyin' Ted Cruz just used a picture of Melania from a G.Q. shoot in his ad. Be careful, Lyin' Ted, or I will spill the beans on your wife! — Donald J. Trump (@realDonaldTrump) March 23, 2016

Lyin' Ted Cruz denied that he had anything to do with the G.Q. model photo post of Melania. That's why we call him Lyin' Ted! — Donald J. Trump (@realDonaldTrump) March 23, 2016

Those beans, presumably, were Heidi Cruz's well-documented battles with depression, something the Cruz campaign had already discussed openly. Trump later retweeted an unflattering comparison of his wife and Heidi Cruz.

(Let's take a moment here to note that these tweets, more than two years later, still haven't been deleted.)

After Trump's attacks, Cruz called the president a "sniveling coward."

“It’s not easy to tick me off,” Cruz said. “I don’t get angry often. But you mess with my wife, you mess with my kids, that’ll do it every time. Donald, you’re a sniveling coward. Leave Heidi the hell alone.”

4. Then Trump brought Cruz's dad into it. — During a surreal phone call with Fox News' Fox and Friends on May 3, 2016, the man who is now the president of the United States accused the father of the man who is now asking for his campaign help of being involved in the assassination of President John F. Kennedy.

“His father was with Lee Harvey Oswald prior to Oswald's being — you know, shot. I mean, the whole thing is ridiculous,” Trump said. “What is this, right prior to his being shot, and nobody even brings it up? They don't even talk about that. That was reported, and nobody talks about it. I mean, what was he doing — what was he doing with Lee Harvey Oswald shortly before the death? Before the shooting? It’s horrible.”

Cruz, justifiably, went off on Trump.

"He is proud of being a serial philanderer ... he describes his own battles with venereal diseases as his own personal Vietnam," Cruz said, pointing to something Trump said during one of his many appearances on Howard Stern's radio show. "This man is a pathological liar, he doesn't know the difference between truth and lies."

Let's reiterate what Cruz said in 2015: "I think he speaks the truth.”

Trump, Cruz went on to say, was a bully.

"Whatever lie he's telling, at that minute he believes it ... the man is utterly amoral," Cruz said. "Donald is a bully ... bullies don't come from strength, they come from weakness."

5. Cruz refuses to endorse Trump. At first. — During his speech at the Republican National Convention in July, Cruz pointedly refused to endorse Trump, earning boos from the crowd in the process. The next morning, he explained his decision at a Texas delegation breakfast.

"I am not in the habit of supporting people who attack my wife and attack my father," he said during a 25-minute Q-and-A.

6. Cruz gets a new habit. — By the beginning of October, not only had Cruz endorsed Trump, but he was making humiliating get-out-the-vote phone calls in front of Trump/Pence signs.

Here's that video of #TedCruz working phone bank at GOP office in Fort Worth. This time with watermark for @dallasnews, the content owner. pic.twitter.com/7D4rTGcXJu — G.J. McCarthy (@gjmccarthy) October 6, 2016

7. Cruz gets Trump's "full endorsement." — In return for his newfound loyalty, Cruz received one of a long list of endorsements handed out by the president during his speech at the National Rifle Association's annual meeting in May. The circle, at least for the time being, is fully closed.