WASHINGTON — Sen. Bob Corker, one of the most outspoken Republican critics of President Trump, has decided not to run for re-election, ending two tense weeks of uncertainty about his future that put the Republican Party on edge.

The Tennessee U.S. senator has 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 his plans.

“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.”

Corker’s decision spares the Republican Party a potentially damaging fight in one of the year’s marquee Senate contests. After Corker initially said he was stepping down, Rep. Marsha Blackburn, R-Tenn., entered the contest. Now, Blackburn has a clear path to the Republican nomination.

Democrats, meanwhile, are pinning their hopes on former Gov. Phil Bredesen, who has the inside track for his party’s nomination.

Corker’s decision, which was first reported by Politico, ensures that 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.

After clashing with Trump frequently last year, Corker has been noticeably less hostile toward the president in recent weeks. He has sought to cultivate bonds with the Trump family and White House officials, including Ivanka Trump, the president’s daughter and a top adviser.

But the White House never issued any public statement of support on Corker’s behalf in the Senate race, leaving him without cover against a potential torrent of brutal political attacks in a contested primary over his past statements criticizing the president.

Blackburn also has sought to strengthen her ties to the White House, holding conversations with senior adviser Kellyanne Conway and others, as her allies touted her as a strong backer of the president.

Sen. Lamar Alexander, R-Tenn., a close Corker ally, said Tuesday that he was “disappointed” by Corker’s decision not to run, but respected it.

“I invited Marsha Blackburn to breakfast this morning,” he said in a statement. “We had a good discussion about a variety of issues that we both care about and how we might work together to make the Senate a more effective institution.”

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.

At the peak of his public hostility, Corker accused the president of “debasing” the country with his “untruths” and “name-calling.” He said he would not have backed Trump’s election to the White House, if he could do it over again.

Trump also criticized Corker last year, attacking the 5-foot-7 lawmaker as “Liddle’ Bob Corker” on Twitter.

Senate Republicans are defending a 51-49 majority in this year’s midterms. Some party officials have grown nervous about the threat presented by Bredesen, even in a state that leans conservative.

Private Republican polling has shown Bredesen to be a formidable opponent, according to a Republican familiar with the findings.