Former Massachusetts Gov. Bill Weld – the sole remaining GOP primary challenger against President Trump – ended his White House bid on Wednesday.

The move by Weld to drop out of the race came the day after president formally clinched the nomination, as Trump topped the 1,276 delegates needed to be the Republican presidential standard-bearer once more.

TRUMP SECURES 2020 GOP NOMINATION WITH PRIMARY VICTORIES

“I hereby announce that I am suspending my candidacy for President of the United States, effective immediately,” Weld wrote in a statement obtained by Fox News. “I am immensely grateful to all the patriotic women and men who have stood with me during the past eleven months in our effort to bring better government to Washington, D.C.”

Weld – a former two-term Republican governor who served at the Libertarian Party’s vice presidential nominee in 2016 – was a longtime vocal Trump critic.

In February of last year, as he took the first step towards launching a long-shot primary challenge against the president, Weld warned that “our country is in grave peril and I cannot sit quietly on the sidelines anymore.” And he slammed Trump, claiming “we have a president whose priorities are skewed toward promoting of himself rather than toward the good of the country.”

Weld formally announced his candidacy in April and spent much of his time on the campaign trail in New Hampshire – which neighbors his home state and holds the first primary in the presidential calendar.

THE LATEST FROM FOX NEWS ON THE 2020 PRESIDENTIAL CAMPAIGN

With Trump extremely popular among Republicans, Weld repeatedly told Fox News and other news organizations that his plan to stay competitive would be to attract independent voters and even some Democrats to oppose Trump on the GOP presidential ballot. Bu the vast majority of independents opted to vote in the Democratic presidential primaries – where all the action was – leaving Weld with no shot of making a dent in the president’s renomination.

Weld’s best primary finish was in the March 3 Vermont contest where he won 10 percent of the vote. He grabbed 9 percent in New Hampshire’s primary and in his home state, far below where he had hoped to finish.

And while Trump’s captured 1,330 delegates to date, Weld only won one – in Iowa’s caucuses.

Weld was joined in the GOP primary battle by former South Carolina governor and congressman Mark Sanford and by former Rep. Joe Walsh of Illinois, a conservative radio talk show host. Sanford ended his bid last autumn and Walsh dropped out after the Iowa caucuses.

Weld, in his statement, said that “while I am suspending my candidacy, I want to be clear that I am not suspending my commitment to our nation and to the democratic institutions that set us apart.”