WASHINGTON — Three years ago, Donald Trump had few friends left in the Senate.

Senate Republican Leader Mitch McConnell declared in a speech that Trump was “practically and morally responsible” for the violent Jan. 6, 2021, attack on the Capitol by spreading “wild falsehoods” about election fraud and trying to overturn his reelection defeat.

After the House impeached Trump for his actions, seven Republicans stood with Democrats and declared Trump guilty. He was acquitted, but several GOP senators — even some who still publicly supported him — distanced themselves from the former president. Many were certain his political future was over.

But it wasn’t. Trump is now the party’s presumptive nominee to challenge President Joe Biden.

Last week, he returned to Capitol Hill to meet with Republicans — the first such official meetings since his presidency — to enthusiastic and near-unanimous support from the Senate GOP conference, including many of the same senators who condemned him for his actions as he tried to block Biden’s legitimate victory. McConnell shook his hand, multiple times, and gave him a fist bump.

The hard feelings, and any memories of the violent end to his presidency, seemed to have faded completely.

“I think that’s in the rearview mirror for most people,” Sen. Lindsey Graham, R-S.C., said of the 2020 election. “There will always be tension there. But I think most Republicans really see President Trump as the only way to turn this country around. And they’re enthusiastic about the chance.”

Republican senators’ embrace of the former president comes after years of ups and downs. With a few exceptions, senators have never backed him as consistently and as eagerly as their GOP counterparts in the House. But as he runs again, Senate Republicans are backing Trump more enthusiastically than ever.

The zealous Senate support is partly rooted in self-interest.

Republicans have a good shot at winning the Senate majority in November, and they know Trump’s support is key to doing that, especially in solidly Republican states like Ohio and Montana where Democratic incumbents are struggling to hold on.

And they are already starting to talk about what they will do if Trump wins and they gain both chambers of Congress.

House Speaker Mike Johnson visited a Senate GOP luncheon last week to discuss the possibility of tax legislation, among other things, if Republicans win full control.

“Our ability to get a majority in the Senate is intrinsically linked to Trump winning,” Sen. Thom Tillis, R-N.C., said after the meeting with Johnson. “So we’re like, one team, one vision.”

Texas Sen. John Cornyn, who is running to succeed McConnell as GOP leader when he steps down from that post in November, said the party faces a “binary choice” between Trump and Biden.

“There is no Plan B,” said Cornyn, who had called Trump “reckless” after the Capitol attack. “I think people know the strengths and weaknesses of both candidates. And for me, I think President Trump is clearly preferable.”

Also, Cornyn added, “his support is going to be important in a lot of these states where he’s very popular, where we have Senate races.”

It’s hardly the first time Republicans have returned to supporting Trump after attempting a clean break.

The arguments, and the whiplash, are a familiar pattern.

McConnell, for example, fully backed Trump in the days before he was elected in 2016, just weeks after the release of a decade-old tape in which Trump was caught on a hot mic bragging to a celebrity news anchor about grabbing women by their genitalia. McConnell had called Trump’s comments “repugnant and unacceptable in any circumstance.”

Once he was elected, Republican senators publicly united behind Trump, aligned with him on policy and were elated by his conservative picks for the Supreme Court.

Most of them defended him through the tumultuous investigations of his campaign’s ties to Russia and rarely criticized him, lest they might be called out by the president on social media and face conservative voters’ ire.

After Trump lost his reelection, though, very few senators backed his false claims of fraud, especially after the courts rejected multiple lawsuits and the Electoral College certified the votes.

But in the weeks, months and years afterward, most of them softened — especially as several Trump allies were newly elected to the Senate and Trump faced several indictments that Republicans see as politically motivated. By early this year, most of the Senate GOP conference had endorsed his third run for the White House.

By the time he was convicted in a hush money trial in New York late last month, he had a sweeping and united backing from the GOP Senate conference.

“Now more than ever, we need to rally around @realdonaldtrump, take back the White House and Senate, and get this country back on track,” Cornyn said in a statement.