Ronald Reagan would be familiar with some of the challenges facing Donald Trump lately.

Imagine an establishment-busting presidential candidate rolling up the primaries but polling 20 points behind the presumptive Democratic nominee. The controversial Republican front-runner is considered so radical that the party establishment eyes a brokered convention, perhaps to nominate a failed candidate from the previous election. Sound familiar? Welcome to March 1980.

In retrospect, Ronald Reagan’s presidency seems inevitable, but the prevailing wisdom in the Republican Party 36 years ago was that he was leading the party to certain defeat. Going into the 1980 race, some Republican leaders thought Reagan was too old, too conservative, or too provocative to win the nomination. But the Gipper was clearly popular with the party’s grass roots. Reagan split some early contests with George H.W. Bush, winning New Hampshire and Vermont but losing Iowa and Massachusetts. Then he ran up a string of five victories in the south and Midwest that gave him a commanding delegate lead. By this stage of the game in 1980, it looked like Reagan was unbeatable.

The GOP Establishment was in meltdown over Reagan’s surge. Comparatively moderate candidates like Howard Baker, John Connally, Bob Dole, and Phil Crane dropped out. Liberal Republican Congressman John Anderson of Illinois was hanging on, Kasich-like, having almost won in Massachusetts, and showing strong second-place finishes in Illinois and Vermont. Anderson became something of a press darling and eventually ran as a third-party challenger (another anti-Trump scenario being discussed these days), netting 6.6% of the popular vote.

But the electability question continued to dog Reagan. A series of opinion polls supported the notion that he simply could not win in November. A Gallup poll from the first week of March showed him losing to Jimmy Carter by 23 points, 57% to 34%. Subsequent March polls from ABC News/Harris and CBS/New York Times showed Reagan losing by 18 and 19 points respectively. Compare those numbers to the latest NBC News/Wall Street Journal poll showing Hillary Clinton leading Donald Trump by 13 points. Los Angeles Times poll director I.A. Lewis declared that “Reagan is the opponent of choice for Carter.”

The only bright spot for the GOP was a hypothetical race between Carter and Gerald Ford in the CBS/NYT poll, in which the former president had a five-point lead. Ford had offered his opinion that Reagan was “too conservative” to win a general election, and speculation was rampant that Ford was going to jump into the race. Commentators began talking about stopping Reagan at a brokered convention and elevating Ford, just as some have suggested anointing Mitt Romney at the upcoming Cleveland convention. Reagan believed that the former President was inclined to run, if not to win outright then to act as a spoiler at the convention. “I wouldn’t be surprised if the strategy is getting to the convention with no one having enough delegates for a victory and having a brokered convention,” Reagan said.

Meanwhile, Jimmy Carter was facing a determined challenge from liberal Senator Ted Kennedy, though doing much better than Hillary Clinton is against Bernie Sanders. By March 18, Carter had limited Kennedy to one win, in his home state of Massachusetts. But Carter did not have the nomination in the bag yet; Kennedy would win five of the eight upcoming contests through the end of April, including upsets in New York and Pennsylvania. Kennedy hung on until the Democratic convention in August, fighting, though failing, to free Carter’s delegates from their commitments to the president. If Mrs. Clinton rolls into the Philadelphia convention under a cloud of indictment for espionage and public corruption, the Sanders team might want to revisit 1980 as well.

We know how the story ends. Carter was dragged down by a sagging economy and the Iranian hostage crisis. By June, Reagan had closed the polling gap. Ford never entered the race, though some wild ideas were discussed at the Detroit convention where Ford was floated as a potential running mate and “co-president” with Reagan. In the end, the Gipper went with second-place finisher Bush, in the interest of party unity. And Reagan beat Carter by 10 points in November, winning the electoral vote by a landslide.

By then, no one remembered the party establishment’s panicky days in March when Reagan’s improbable nomination suddenly became inevitable. Or when every national poll showed Carter trouncing Reagan by substantial margins. Or the crazy schemes being dreamed up to derail the candidate who had won the support of the majority of party faithful, in the flawed belief that victory in November was impossible. Yes, Mr. Reagan would find this very familiar indeed.

James S. Robbins is a USA Today columnist and author of Native Americans: Patriotism, Exceptionalism and the New American Identity.