Rick Hampson

USA TODAY

When a political party loses a presidential election, it usually has to change — the bigger the loss, the bigger the change. But Republicans could face greater upheaval if Donald Trump wins in November than if he loses.

A Trump victory would redefine the party, transform its credo and presage one of the biggest realignments in U.S. political history.

But a loss — even (or maybe especially) a big one — would simply send the GOP back to the drawing board, as defeat did the Republicans and Democrats in 1964 and 1972, respectively. Four years later, each claimed the White House. Parties are more willing to compromise and experiment “when they get tired of losing,’’ says Whit Ayres, a GOP pollster.

And there’s generally something to salvage from a failed campaign.

“You can take elements of a losing philosophy, tone them down and repackage them,’’ says Joel Kotkin, a political analyst who despises Trump but says he’s “clearly on to something.’’ Anger with establishment elites, political correctness and trade deals that hurt U.S. workers seems likely to endure, no matter Trump’s fate.

That’s not to minimize the turbulence Republicans face, win or lose.

Defeat would only put them back where they were after the 2012 election. Party leaders conducted an “autopsy’’ and agreed on the need to reach out to certain voters — especially Hispanics — and consider immigration reform, while continuing to advocate free markets, small government and muscular internationalism.

Then came a 17-candidate nomination battle that produced Trump, who’s done the opposite of what the autopsy prescribed. Now, says Ayres, “Someone will have to put Humpty Dumpty back together again.’’

Tale of the tape: The 16 contenders Trump has knocked out

Is it Trump or Clinton?

No matter what happens Nov. 8, the party that freed the slaves and preserved the Union, that busted the trusts and won the Cold War, faces a turning point. It could win the election and lose its identity. “A Trump win would hasten the demise of the party as we know it,’’ says William F. B. O'Reilly, a New York Republican consultant.

Or a Trump loss, especially a big one, could call into question the GOP’s ability to elect candidates — a major party’s raison d’etre.

A week before Trump announced his candidacy last June, GOP Chairman Reince Priebus said defeat was not an option: “We don’t exist as a national party if we don’t win in 2016.”

Now the party establishment seems braced for the apocalypse. At a George W. Bush administration reunion in April, the former president told some attendees he was worried he’d be the “last Republican president.’’

Was he serious? Others are. Speaking at the Democratic convention, former Reagan White House aide Doug Elmets, a Trump critic, said, ''What you see is really no longer the Republican Party.'’

Doomsayers are even invoking the fate of the Whigs, a party that elected two presidents but came apart over slavery in the 1850s.

A house divided

Trump’s ascendance has both reflected and exacerbated the Republican crisis.

Republicans, so disciplined and so coherent for so long, have become a circular firing squad of libertarians and evangelicals, free traders and protectionists, interventionists and isolationists, Wall Street and small business. The rank and file is alienated from the big donors.

And, as party elders concluded after 2012, demographics are running against the GOP. As Kotkin puts it, “You can’t just be the party of white people’’ — let alone older white people.

There are optimistic precedents for a Republican revival; they start with political disasters.

Election flashback quizzes: 10 ways to distract yourself from the 2016 race

1964: Democratic President Lyndon Johnson got 61% of the popular vote, 486 of 538 electoral votes and 44 of 50 states. “Not since the Whigs,’’ Theodore H. White wrote of the GOP, “had any great party seemed so completely to have lost touch with reality.’’

Losing candidate Barry Goldwater was so toxic that three months later he was not welcome at any of Ohio’s eight Lincoln Day dinners.

Goldwater, though a sitting senator and a devout conservative, was the Trump of his day, having told the convention that “extremism in defense of liberty is no vice.’’

But Goldwater saw the future, which was increasingly conservative. Four years later, Richard Nixon dusted off his emphasis on law and order and appeal to Southern whites to win the presidency.

And 12 years after that, Ronald Reagan, who campaigned for Goldwater, won the first of two presidential landslides.

1972: Democratic nominee George McGovern lost 520 of 538 electoral votes and 49 states. Like Goldwater, he was accused of extremism (too liberal); had a disastrous convention (gave his acceptance speech after midnight); and headed a divided party.

But four years later the chastened Democrats nominated a Southern centrist, former Georgia governor Jimmy Carter, who defeated President Gerald Ford.

1988: Sometimes recovery from political disaster takes more than four years.

Democrat Michael Dukakis’ loss to Vice President George H.W. Bush followed even worse blowouts in 1980 and 1984. Over three presidential elections, the Democrats won only 17 states.

Dukakis was governor of liberal Massachusetts. In 1992 the party turned to Bill Clinton, the moderate governor of Arkansas, who won the next two national elections.

What’s next for the GOP?

If Trump wins … his supporters, many new to the party, will be “energized and empowered,’’ says Tobe Berkovitz, who’s advised many political campaigns and teaches at Boston University. “They’ll feel, ‘Despite everything against us, we won!’ ’’

The Grand Old Party will be something new: more nationalistic and populist; less internationalist and ideologically conservative; and reliant on the president’s charisma and instincts.

It will also be what Dan Schnur, director of USC’s Unruh Institute of Politics and communications director for John McCain's 2000 presidential campaign, calls “the first step in the most fundamental realignment in the political system in over a century.’’

If Trump loses … there go many of the voters he attracted. Angry to begin with, they’ll be apoplectic that so many Republicans sat it out or opposed their man.

Will another politician (or politicians) step into Trump’s shoes? An immigration hawk like Arkansas Sen. Tom Cotton, who could avoid Trump’s gaffes?

Maybe, but Ayres says if anyone other than Trump said what Trump said, he wouldn’t have gotten anywhere. If so, the future belongs to someone like Nebraska Sen. Ben Sasse, a founding Never-Trumper.

Ben Sasse, the Senate GOP's 'Never Trumper,' irks some voters at home

Elections 2016 | USA TODAY Network

The party will remain divided over issues, control and blame for Trump’s nomination. Columnist George Will has written of Trump supporters as “quislings’’ and “collaborationists’’ who are “ineligible to participate in the party’s reconstruction.’’

That reconstruction will have to reckon with the legacy of a campaign that soured many voters on the GOP brand.

All of which leads Kotkin to this conclusion: “The Republicans are better off if Trump loses, but not by too much.’’

The worst scenario would be to lose Trump’s enthusiastic supporters and revert to the default national strategy of 2008 and 2012.

Schnur explains the party’s obstinacy by the fact that those defeats, while not close, were not landslides; and they were mediated by midterm election victories.

But if Trump goes down — and certainly if the party loses control of Congress — the lesson finally will be too obvious to overlook.