They stood center stage before a cheering crowd of thousands five years ago, shaking hands in a half embrace that seemed to cement a political and ideological bond that would serve as the foundation for Donald Trump’s presidency

“We have a man here who really helped me — and he was the one person I sought his counsel, because he’s been so spot on. He’s so highly respected. Has anybody ever heard of Senator Jeff Sessions? Huh? Jeff, come up, where’s Jeff? Get over here, Jeff,” the former reality TV show host said to a roaring ovation in August 2015.

“Donald, welcome to my hometown, Mobile, Alabama,” then-Sen. Sessions (R-Ala.) said, donning a white “Make America Great Again” cap. “The American people, these people, want somebody in the presidency who stands up for them, defends their interests and the laws and traditions of this country.”

That once remarkable bond came to a crashing end Tuesday night when the Associated Press declared that Tommy Tuberville had defeated Sessions in the runoff to be the Republican nominee in November’s Senate race against Sen. Doug Jones (D-Ala.). The result culminated four months of Trump imploring Alabama’s voters to reject Sessions, the man who the president once said he leaned on for advice in forming his “America First” agenda.

Running for his old Senate seat — which he abandoned in early 2017 to become Trump’s attorney general — Sessions endured one brutal insult after another from the president. Trump’s endorsement of Tuberville in the race has always seemed to have more to do with Trump’s anger at Sessions over his recusing himself from the Russia investigation while attorney general than with any particular support for the former Auburn University football coach.

“I will tell you, I got to know Jeff Sessions very well,” Trump told Tuberville supporters on a conference call Monday night, “I made a mistake when I put him in as the attorney general. He had his chance and he blew it. He recused himself right at the beginning, just about on Day One on a ridiculous scam, the Mueller scam, the Russia, Russia, Russia scam.”

Trump chose not to rub too much salt into Sessions’s wounds Tuesday night, but he quickly hailed Tuberville’s victory.

“Tommy Tuberville WON big against Jeff Sessions. Will be a GREAT Senator for the incredible people of Alabama,” Trump tweeted. “@DougJones is a terrible Senator who is just a Super Liberal puppet for Schumer & Pelosi. Represents Alabama poorly. On to November 3rd.”

Tuberville entered Tuesday the favorite after he and Sessions finished as the top vote getters in a March 3 initial primary ballot. His victory was declared quickly — a final humiliation for Sessions, who was once so untouchable that Alabama Democrats didn’t field an opponent against him in his 2014 reelection.

Rather than fight Trump, who remains very popular among Alabama Republicans, Sessions spent the final months of the campaign pledging his loyalty to a president who constantly demeans him. He told voters that he was, in fact, the real pro-Trump candidate because he had spent so much time working on the immigration and trade policies that are the centerpiece of the president’s agenda.

Emerging from casting his own ballot Tuesday morning, Sessions made one final, almost sad, assertion that he would be a Trump purist if he won his old seat back, noting that several staunch conservatives had overcome the president’s endorsement of other candidates in recent weeks.

“In all three, the candidate who actually won was a stronger supporter of the Trump agenda,” Sessions told reporters.

In one Senate race, in a state that gave rise to the nativist underpinnings of Trumpism, the president made clear the real central tenet of his ideology: loyalty.

Fealty to the president takes precedence over every other ideological standard.

Take last weekend.

On Friday night, Trump went to bed after commuting the federal prison sentence of his longtime friend and adviser Roger Stone, who had been convicted of lying to Congress to shield Trump from investigators examining Russian interference in the 2016 election. Stone never yielded, never gave the FBI anything on Trump, and the president wiped out Stone’s sentence days before he was to go to prison.

Trump started his Saturday by excoriating Sessions for the perceived offense of not doing enough to stop or undermine the Russia investigation. “Jeff Sessions is a disaster who has let us all down. We don’t want him back,” Trump tweeted at 8:36 a.m. Saturday.

The FBI investigation, begun in July 2016, started well before Sessions set foot in the Justice Department and well before he took the advice of career prosecutors to recuse himself from the investigation, given his prominent role on the Trump campaign and because he had met with the Russian ambassador in the run-up to the election.

The president argues that the recusal led to the appointment of a special counsel, Robert S. Mueller III, to conduct an investigation that haunted much of his first three years in office.

Defenders of the former attorney general say privately that with the investigation already underway, it would have continued even if Sessions had not recused himself and that it just would have been run inside the corridors of the main Justice Department.

Sessions is not the first high-level adviser to face Trump’s public wrath, and there probably will be others, but none has faced such an utter and continued humiliation as Sessions, the rare banished sidekick who tried to restart a life in public service.

Several members of Trump’s first Cabinet and early inner circle have found themselves on the receiving end of a sharp-tongued tweet or public insult from a president who has faced record turnover among his top aides.

Trump called Rex Tillerson, his first secretary of state, “dumb as a rock” after he left the administration. He blasted his first defense secretary, Jim Mattis, as “our Country’s most overrated General,” after Mattis spoke out and called Trump a threat to democracy.

Trump accused his former chief of staff, John Kelly, of being in “way over his head” and going out “with a whimper.”

“Like so many X’s, he misses the action & just can’t keep his mouth shut,” Trump wrote on Twitter in February.

White House aides including Omarosa Manigault Newman, Stephen K. Bannon, Anthony Scaramucci and former national security adviser John Bolton, and former White House counsel Donald McGahn also have faced withering public attacks from the president.

Trump has described Washington as a “swamp” that is “vicious, horrible, ugly and evil, much worse than I thought” and has publicly lamented the lack of loyalty he has perceived in the nation’s capital.

Those considered insufficiently loyal include several Republican lawmakers, whom Trump also has targeted with public insults. Trump recently attacked Sen. Mitt Romney (R-Utah) and Sen. Patrick J. Toomey (R-Pa.) as “RINO’s” — shorthand for Republicans in name only — after both men voiced concerns about the president’s commutation of Stone’s sentence.

But unlike the other outcasts, Sessions was so central to the president’s political origination that he seemed destined to remain at center stage throughout the Trump show. He was careful to praise, not cross, Trump since being fired, unlike many of the other former officials Trump has publicly trashed.

By the summer of 2015, as most Republicans dismissed Trump’s chances of winning the Republican presidential nomination, Sessions became a senior adviser to the real estate heir. Their views on immigration and trade, out of step with traditional GOP orthodoxy, meshed.

As Trump railed against immigrants, Sessions drew closer. The Alabamian’s top advisers in the Senate went to work on the campaign. Among them was Stephen Miller, who is now Trump’s top domestic policy aide.

The Sessions-led Justice Department formed the early legal opinions for controversial moves such as trying to deny U.S. entry to citizens of several majority-Muslim nations.

But then he recused himself from the Russia case, setting in motion Mueller’s appointment. That was a perceived sin from which he could never recover in Trump’s eyes.

Sessions’s defenders say he tried to inoculate the integrity of the Justice Department from the most politically sensitive investigation in the nation.

Instead, liberal activists bemoaned the complicated conclusions in the Mueller report, which never explicitly accused senior Trump officials of a crime, and conservatives heard over and over from Trump that the investigation was a “witch hunt.”

And Sessions left himself wounded for his own political future. Trump fired him Nov. 7, 2018, and Sessions entered the race for the nomination to take on Sen. Doug Jones (D) — who won the seat in a December 2017 special election after the GOP nominee, Roy Moore, was accused of pursuing romantic interests with teenage girls while he was a lawyer in his 30s.

Alabama Republicans, hoping to reclaim a seat they fumbled away three years ago, made the race a priority years ago. Tuberville, Rep. Bradley Byrne (R-Ala.) and Moore jumped into the race in early 2019, but then Sessions made a late entry.

Trump, under the encouragement of the state’s senior Republican, Sen. Richard C. Shelby, stayed out of the initial ballot, but a week after Sessions and Tuberville advanced to the runoff, the president threw his support behind the former football coach.

Tuberville will enter the contest with Jones functionally broke.

GOP strategists think Jones, who had raised more than $15 million by March 30 and has been spending on largely positive ads, will immediately launch a sharp negative attack on Tuberville, who will be scrambling to raise money for the general election.

Republicans will be heavily reliant on two outside conservative groups, the Club for Growth and One Nation, which have booked about $5 million worth of advertising.

The ads, strategists said, are expected to focus heavily on Jones’s voting record, including his support for convicting and removing Trump from office during the impeachment trial this year and his October 2018 vote against the confirmation of now-Supreme Court Justice Brett M. Kavanaugh.

They hope this will buy enough time for the Tuberville to reload a campaign war chest and take over the line of attack later in the summer in a race Republicans are confident they will win.