Corey Lewandowski, a former campaign manager to President Trump, said Tuesday that he would forgo a Republican Senate bid from New Hampshire, ending months of public mulling over a contest against Sen. Jeanne Shaheen (D) in the swing state.

Lewandowski said over the summer that he was looking “very seriously” at running in New Hampshire, a prospect that was touted by Trump, who called Lewandowski “a fantastic guy” who “would be a great senator.”

In tweets Tuesday, Lewandowski gave no explanation for his decision not to enter the race and said he plans to endorse a Republican candidate in the primary.

“While taking on a career politician from the Washington swamp is a tall order, I am certain I would have won,” Lewandowski tweeted. “My priorities remain my family and ensuring that @realDonaldTrump is re-elected POTUS.”

Despite Trump’s public enthusiasm about a Lewandowski bid, the possibility that his controversial former aide might run for the Senate prompted heartburn among some in the Republican Party. Some feared a Lewandowski bid would complicate the reelection prospects of the state’s incumbent GOP governor and put the New Hampshire Senate race — a lower-tier pickup opportunity for Republicans — out of realistic reach.

In a statement after Lewandowski’s announcement, New Hampshire Democratic Party spokesman Josh Marcus-Blank said the remaining Republicans seeking the seat would “tear each other down in the contentious primary Lewandowski has left behind.”

“Senator Shaheen will continue working across the aisle for New Hampshire, leading efforts to lower prescription drug costs and making sure veterans and their families get the benefits they deserve,” he said.

Lewandowski, 45, who advocated a freewheeling style of letting “Trump be Trump,” guided the presidential campaign through some crucial primary wins, including in New Hampshire, a state in which he has lived.

Lewandowski was fired by the campaign in 2016, when Paul Manafort became campaign chairman after an internal power struggle, but he still has close ties to Trump.

Republicans are eyeing New Hampshire as a possible pickup opportunity in the Senate next year.

Shaheen, a former New Hampshire governor, was reelected to a second Senate term in 2014 with 51 percent of the vote in a race against Scott Brown, a former Republican senator from Massachusetts who had moved to the state.

Democrat Hillary Clinton carried the Granite State over Trump in the 2016 presidential election by 2,736 votes.

Lewandowski has previously run for office. In 1994, he sought a seat in the Massachusetts state legislature. In 2012, he ran for town treasurer of Windham, N.H. Both bids were unsuccessful.

Lewandowski’s political career included work with Americans for Prosperity, an advocacy group backed at the time by the billionaire brothers Charles and David Koch.

Shortly after Trump’s election, Lewandowski launched a government affairs and political consulting firm, openly advertising plans to benefit from loyalty to his former boss. A news release issued by the firm, Avenue Strategies, touted its location “just a block from the White House” on Pennsylvania Avenue and quoted Lewandowski saying, “I will always be President-elect Trump’s biggest supporter.”

Lewandowski left that firm in 2017 and has since run a consulting firm and serve as an adviser for lobbying firm Turnberry Solutions.

Seung Min Kim contributed to this report.