In the third and last presidential debate on Wednesday night, Donald Trump again refused to say whether he would concede to Hillary Clinton if he is the loser of the Nov. 8 election. Americans must now contend with a candidate who casts doubts on the democratic process before the votes have been counted and who suggests that the election is rigged, without offering any evidence to back up his claim.

This is unprecedented. By contrast, consider the behavior of past presidential candidates who lost elections but who actually had reason to complain about the outcome, if not contest it. Their example tells us much about the conventions and expectations that, till now, have ensured the stability of the U.S. political system.

Take, for example, Andrew Jackson. He had genuine grounds for believing that the outcome had been rigged and the democratic process subverted when he first ran for president in 1824. And yet Jackson, a man who typically settled disputes with dueling pistols, nonetheless graciously stepped aside when it became clear that protest would damage the nation’s political institutions.

The election of 1824 featured no less than four candidates: the New Englander and former Secretary of State John Quincy Adams; Henry Clay of Kentucky; Secretary of the Treasury William Crawford from Georgia; and Jackson, a war hero.

With the possible exception of Jackson, these candidates had regional followings. On Election Day, Jackson decisively had the broadest and biggest level of support throughout the country, garnering 41.4 percent of the total vote, with Adams far behind in second place, at 30.9 percent. The other two candidates picked up only modest support. Jackson also accumulated the most electoral votes, 99, compared with 84 for Adams.

But Jackson had not won a majority of the electoral vote, only a plurality. According to the 12th Amendment to the Constitution, that meant the election would be decided in the House of Representatives. At this point, the politicking and scheming began, despite the fact that Jackson was obviously the “people’s choice,” as a growing number of newspapers dubbed him.

For his part, Jackson pointedly refused to participate in any machinations. He wrote a friend of the “calm, deliberate rule I have prescribed to myself — I will not, have not, in the least interfered,” and then added that “I would feel myself degraded to be placed into that office but by the free unsolicited voice of the people — Intrigue may stalk around me but it cannot move me from my purpose.”

Others weren’t so ethical. Although the details remain somewhat murky, it seems that Henry Clay, who had finished last in the race, cut a deal with Adams and his allies. If Clay could deliver the election to Adams, he wanted something in return: the position of secretary of state, then considered a stepping-stone to the presidency.

Clay was in a position to deliver the goods: He was speaker of the House of Representatives. Unfortunately for him, the legislature in his home state of Kentucky met and instructed its congressional delegation to vote for Jackson. Clay ignored these instructions and instead coerced the delegation to vote for Adams, even though Adams had not received a single popular vote in the entire state.

The outrage was immediate. Sen. Robert Hayne of South Carolina denounced the “monstrous union between Clay & Adams, for the purpose of depriving Jackson of the votes of the Western States where nine tenths of the people are decidedly in his favor.” Soon rumors emerged that Clay had bartered his state’s votes and the votes of other states to gain a coveted spot in the Adams administration.

This drama reached its sordid conclusion in February 1825, when after further backroom deals, the House voted to give the presidency to Adams. Jackson, historian Robert Remini concluded, “had lost the election through the deliberate conniving of a handful of politicians.”

Jackson was aghast but kept his displeasure private. In fact, on Feb. 10, he attended a reception to honor the incoming president. The inevitable happened: Jackson and Adams came face to face, surrounded by the expectant crowd of Washington insiders.

Jackson had shot men for far less than theft of the presidency, but here he remained magnanimous, extending his hand and declaring, “How do you do, Mr. Adams?” An onlooker applauded Jackson’s “manly style.” In succeeding weeks, Jackson’s calm demeanor attracted growing respect and Adams became the object of ridicule for seizing the presidency in an underhanded manner.

Clay’s reputation also sustained permanent damage when he accepted a position in the Adams cabinet. Jackson privately fumed that “the Judas of the west has closed the contract and will receive the thirty pieces of silver.” But in public he did nothing to damage the legitimacy of the Adams administration. Four years later, voters rewarded Jackson with the presidency.

Jackson’s demeanor set a precedent that other disappointed office-seekers followed in every election, even those deprived by fraud and corrupt dealings. Samuel Tilden, for example, should have won the election of 1876, but victory was snatched away by an especially grotesque political deal that resulted in the end of Reconstruction and the removal of protections for black Americans. Yet Tilden did not tell his supporters to riot and revolt. Instead, he gave a measured concession speech in which he reassured his supporters: “Be of good cheer. The Republic will live. The institutions of our fathers are not to expire in shame. The sovereignty of the people shall be rescued from this peril and be re-established.”

Subsequent presidential candidates who lost under dubious circumstances — Richard Nixon in 1960 and Albert Gore in 2000 — followed suit, graciously putting the stability of the country above their personal grievances.

Until Trump. Unlike any of these men, he hasn’t a leg to stand on when it comes to claims of malfeasance. Rather, he looks likely to lose an election that, however ugly, is entirely fair and square. And yet he cannot muster the sort of selflessness and long-term interest in America’s political institutions that has become the norm for losing candidates, even those who had grounds for thinking they had been shortchanged.

Stephen Mihm is an associate professor of history at the University of Georgia. His books include “A Nation of Counterfeiters: Capitalists, Con Men and the Making of the United States.”