Boston Globe via Getty Images Former Massachusetts Gov. Bill Weld is looking to challenge President Donald Trump in the 2020 Republican primary.

CONCORD, New Hampshire ― Ronald Reagan did it to Gerald Ford. Ted Kennedy did it to Jimmy Carter. Pat Buchanan did it to George H.W. Bush.

And now, Bill Weld wants to do it to Donald Trump.

The only incumbent presidents to lose re-election in the past half century were those who faced a credible challenge from within their own party, which is why the former Massachusetts governor, who ran for the vice presidency as a Libertarian in 2016, has re-enrolled as a Republican and is gearing up to challenge Trump in the GOP primaries next year.

“It is in the best interest of our nation that Republicans have a strong alternative to Donald Trump,” Weld told HuffPost. “I am exploring a run to offer Republicans that alternative.”

Not one of the incumbent presidents who were “primaried” actually lost his party’s nomination, although Democrat Lyndon Johnson’s decision not to seek a second full term in 1968 was clearly influenced by how well Eugene McCarthy did in the New Hampshire primary. The anti-war Minnesota senator came within six points of Johnson, losing 48 to 42 percent. Johnson dropped out three weeks later, which suddenly made the presidency an open seat and led to the election of Republican Richard Nixon.

Gerald Ford, who ascended to the Oval Office from the vice presidency after Nixon resigned in 1974 amid the Watergate investigation, was challenged in the 1976 primaries by Ronald Reagan. The former California governor nearly won, and his concession speech on the Republican convention floor laid the groundwork for his successful presidential run in 1980.

As it happens, Reagan’s win that November was greatly assisted by Massachusetts Sen. Ted Kennedy, who ran against incumbent Jimmy Carter in the Democratic primary. Kennedy did not come as close to taking the nomination as Reagan had in 1976, but the split in the Democratic Party was far more bitter. Liberal Democrats remained disenchanted with Carter, while conservative Republicans finally had the candidate they had dreamed about in Reagan.

A similar story unfolded in 1992. Conservative Republicans were livid with George H.W. Bush for compromising with Democrats and raising taxes in a balanced budget agreement. Pat Buchanan, a former speechwriter for President Nixon but better known for his role on CNN’s “Crossfire,” jumped into the race in late 1991, campaigning almost exclusively in New Hampshire.

The gambit paid off. He lost to Bush by 15 points but won 37 percent of the vote ― putting an exclamation point on Bush’s weakness within the GOP voting base.

“Half of the people who voted for Buchanan really liked Buchanan. The other half were just using Buchanan to send a message,” said Fergus Cullen, a former New Hampshire Republican Party chairman who, like many longtime New Hampshire GOP officials, hopes to stop Trump from winning a second term.

Compared to both Reagan and Kennedy, Buchanan posed a far weaker threat to the incumbent. His vote share in New Hampshire was his high-water mark in the primaries, and Bush’s showing there ― 52 percent ― was his weakest. It did not matter.

Bush’s advantage of incumbency was severely diminished, which soon enough led to the entry of billionaire Ross Perot into the race ― which that fall led to the election of Bill Clinton. The previously little-known Arkansas governor was able to win the Democratic nomination after more established Democrats had chosen not to run because of Bush’s popularity after the first Gulf War.

“The damage was done,” Cullen said. “What Buchanan did was expose that Bush was vulnerable.”

Buchanan further compounded Bush’s problems by using his convention speaking slot that summer to deliver an angry, us-vs.-them diatribe against gay people, immigrants and non-Christians. “We must take back our cities, and take back our culture, and take back our country,” Buchanan thundered.

The message helped Democrats rally against Republicans that autumn. It also widened a rift between the Republican Party’s pro-business wing and an insurgent “cultural conservative” wing. That divide, papered over during the George W. Bush years, has remained and even expanded, ultimately leading to the nomination of Donald Trump in 2016.

And that, in turn, has led to a backlash from more traditional Republicans like Cullen and fellow former state party chair Jennifer Horn, who has been helping Weld organize his New Hampshire efforts since he announced his exploratory committee last month.

“Integrity, character and honor matter. The Constitution matters,” Horn said. “I could not possibly suggest that I care about these things and support Donald Trump at the same time. I oppose him for the same reason I got involved with politics to begin with ― because I’m a mom. And now a grandmother. I owe it to my children to never abandon this fight.”

Anti-Trump Republicans are fairly open about their main goal, which is not necessarily to advance a particular candidate but to see a well-organized and well-funded Republican wind up challenging Trump.

For much of the president’s first two years in office, the most obvious challenger was former Ohio Gov. John Kasich, who was among the last primary rivals to continue running against Trump in the spring of 2016 and who kept up steady criticism of Trump after his election. So far, though, Kasich has not committed to running and has taken an on-air political analyst position with CNN.

More recently, advisers to Maryland’s Larry Hogan have invited speculation that the second-term Republican governor in a deeply Democratic state might be interested in challenging Trump, too. Hogan is further fueling conjecture with a planned appearance next month at “Politics and Eggs,” a breakfast series at New Hampshire’s Saint Anselm College that is known as a launching pad for presidential bids.

For now, though, the anti-Trump Republican field is Weld’s alone. This week, he is making a number of campaign-style stops ― although he technically has not announced a full-fledged campaign ― in Concord and Manchester, New Hampshire, including a planned visit with Republican Gov. Chris Sununu. On Sunday, Cullen will host a house party for Weld at his home in Dover.

“He’s taking a chance. He’s putting himself out there,” Cullen said. “Anybody who’s out there publicly, making the argument that so many are making privately, deserves some support.”

As for Weld, he said that if others want to join him in going after Trump, he welcomes their company. “Governor Hogan is a first-rate governor,” Weld said. “Should he run as well, I look forward to spending time with him on the campaign trail.”