For two and a half tense weeks, Bob Corker quietly pondered a dramatic reversal: running for reelection to the Senate seat he had forsaken. Inside the White House, there was a loud movement to stop him.

Many of President Trump’s political aides made it a priority to ensure that the Tennessean, who has accused the president of “debasing” the country with his “untruths” and “name-calling,” did not reenter the race. So they went straight to the one person with the ability to give Corker a new lease on his political life: Trump himself.

They frequently reminded the president of Corker’s criticism, at times even providing specific examples. They kept folders documenting the attacks from Corker and other Trump detractors. They argued that if Trump backed Corker, all that ugliness would receive renewed national attention.

On Tuesday, Corker announced that he would not run, ending a stretch of uncertainty that put the Republican Party on edge. He did it without ever getting a public show of support from Trump or the White House. The most he received was an assurance from Trump to remain neutral in the race, according to a person familiar with Corker’s thinking.

The flurry of White House activity targeting Corker, described by three people familiar with the situation, underscores the increasing role the president and his team are looking to play in the midterm elections — and their desire to elevate candidates who have demonstrated loyalty.

In the battle for the Senate majority, the White House has made a noticeable imprint in recent weeks. It helped lure a top recruit to run in North Dakota, agreed to help a struggling Missouri candidate raise money and assisted in quickly delivering a backup contender in Ohio after the top choice of party leaders suddenly dropped out.

Trump on Tuesday tweeted his support for Sen. Roger Wicker (R-Miss.), hours before an announcement from Republican Chris McDaniel on a possible Senate challenge.

In recent months, the White House has worked more closely with Senate Majority Leader Mitch McConnell (R-Ky.) and his confidants, opening a new chapter in a relationship that hit rock bottom last summer.

More involvement by the White House also means more risk for a party defending a 51-to-49 majority in the Senate. Trump’s decision last year to stand by embattled Alabama Republican Roy Moore, after much of the party disavowed him, extended Moore a political lifeline that eventually did not prevent a crushing defeat and a blow to the GOP’s image.

The president has historically low approval numbers, and even some of his biggest defenders doubt how helpful he can be.

Even so, Trump is keen on making his mark in Senate races, those close to him said. “Oh yeah, absolutely,” said Sen. David Perdue (R-Ga.), a close Trump ally.

Corker spent much of this month rethinking his decision to forgo a third term and saying little in public about his status. On Tuesday, his chief of staff, Todd Womack, issued a written statement cementing Corker’s plan to leave the Senate.

“We spent the last few days doing our due diligence and a clear path for reelection was laid out,” Womack said. “However, at the end of the day, the senator believes he made the right decision in September and will be leaving the Senate when his term expires at the end of 2018.”

Later, Corker was in an engaging mood but was determined not to say what had swayed him.

“You know, I haven’t ever said anything about this publicly,” he said. “And I probably never will.”

But when asked about the White House’s cold posture, Corker offered a more curt reply, cutting a reporter off mid-question. He said there was no issue with the White House.

Some in Corker’s inner circle said the president’s neutrality was enough for him to wage a competitive campaign. But other Republicans and senior White House aides argued he would have needed more than that from Trump to have a chance.

Corker had talked with Vice President Pence, National Economic Council director Gary Cohn and others about the race and the White House’s position, people familiar with the situation said.

“If he didn’t get the president, he couldn’t win in Tennessee,” said one senior administration official, who like others interviewed for this story spoke on the condition of anonymity to be candid.

As Corker considered his plans, Rep. Marsha Blackburn (R-Tenn.), who entered the Senate race after Corker first said he would not run again, sought to strengthen her ties to the White House. She held conversations with senior adviser Kellyanne Conway and others as her allies touted her as a strong backer of the president.

The president’s political team, including his legislative affairs director, Marc Short, political director Bill Stepien and others, also talked up Blackburn to Trump and were determined to secure significant face time for her with the president.

Blackburn thanked Corker in a brief statement Tuesday and looked ahead to the general election.

Beyond Tennessee, the White House is looking to dive into the midterm landscape to help the party hold its fragile congressional majorities. Trump is likely to attend about a dozen fundraisers in the next two months — including one in Missouri next month for state Attorney General Josh Hawley, whose Senate fundraising pace has come under criticism by Republicans.

The White House has also distributed lengthy surveys asking candidates to explain why they like the president and the president’s agenda.

Stepien is holding monthly meetings with his counterparts at the GOP campaign committees, said a senior White House official. The official said the White House was in contact with McConnell and his political confidants often.

Looking ahead to the fall midterm stretch run, the senior White House official said, Trump hopes to be on the road as “often as four or five times as week.”

On the recruiting front, Republicans credit the White House with helping nudge Rep. James B. Renacci into the race for a U.S. Senate seat from Ohio after the sudden departure of state Treasurer Josh Mandel. The White House also pushed Rep. Kevin Cramer to run for a U.S. Senate seat from North Dakota after he initially passed on the race.

Corker, who made his mark in the construction industry and initially bonded with Trump over their business careers, soured on Trump over the course of 2017. Trump also criticized Corker last year, attacking the 5-foot-7 lawmaker as “Liddle’ Bob Corker” on Twitter.

After clashing with Trump frequently, Corker was noticeably less hostile toward the president in recent weeks. He has sought to cultivate bonds with the Trump family and White House officials.

But people close to Trump told him that Corker could be loyal to the president through 2018, when he needed him to win, but could later become a free agent who would sharply criticize him again.

Democrats are pinning their hopes in Tennessee on former governor Phil Bredesen, who has the inside track for his party’s nomination. Some Republican officials are nervous about the threat presented by Bredesen, even in a state that leans conservative. Private GOP polling has shown Bredesen to be a formidable opponent, according to a Republican familiar with the findings.

There was a belief among some in the Republican Party that Corker would fare better in a general election showdown with Bredesen than Blackburn would. If she falters, it could prompt some second-guessing about the White House move against him.

Corker’s decision ensures one thing: Trump’s two most vocal Senate Republican critics will be gone from the chamber next year, barring further surprises. Sen. Jeff Flake (R-Ariz.), who has lambasted Trump, is also retiring.