See more of the story

In the weeks leading up to Tuesday's election, scholars and political commentators were busy gaming out doomsday scenarios on the chance of a contested result. Despite the existence of laws designed to mediate such disputes, concerns abound because of the tremendous uncertainty in the constitutional and statutory framework governing federal elections.

More than any other contest, the 1876 election shows us that our laws and democratic institutions have not always been up to the task of resolving an election crisis. We still face the prospect that consequential decisions may fall to a single person — be it a candidate, a governor, a legislator or an election official — who may have to decide between party and country in resolving a contested election.

In 1876, that person was Samuel Randall, who played a key role in avoiding dueling inaugurations where the Republican nominee, Rutherford B. Hayes, and the Democratic nominee, Samuel J. Tilden, each presented themselves as the lawfully elected president of the United States. Decisions that Randall, a Democrat, made as the speaker of the House might have forestalled the violent conflict — both inside and outside of the congressional chamber — by supporters on both sides if their candidate was not declared the winner.

With its heady mix of voter disenfranchisement, election fraud and extreme partisanship, the Hayes-Tilden dispute was a political maelstrom for which the U.S. Constitution had no specific remedy. The Constitution leaves significant discretion in the hands of officials who are tasked with facilitating the selection of the president. This discretion was often misused, and the years leading up to 1876 would set the stage for such abuse.

The social, economic and political unrest of the 1870s created the ideal conditions for an election meltdown. The Panic of 1873 triggered an economic depression that led to widespread job losses and business failures. Because of the bad economy, voters repudiated the Republican Party at the polls. The Democrats took the majority in Congress and were unwilling to extend Reconstruction policies designed to protect the civil and political rights of African Americans. From 1874 to 1876, Democrats began to "redeem" state governments in the South, displacing Republican Party control and disenfranchising African Americans through fraud and violence.

With the future of Reconstruction on the ballot, the presidential election of 1876 was hard fought. Tilden decisively defeated Hayes in the popular vote by about 250,000 votes, but in four states — Florida, Louisiana, Oregon, and South Carolina — both parties claimed to have won electoral votes. At that point, Tilden needed only one more electoral vote to win, so any of the four would suffice.

However, Republicans still controlled the election canvassing boards and governorships in the three Southern states, which led to the manipulation of vote counts and the subsequent awarding of electoral votes to Hayes. Democrats refused to give up and sent competing slates of electors for Florida, Louisiana and South Carolina to Congress. In addition, the Democrats challenged the eligibility of one of Oregon's electors, a fail-safe that would lead to a Tilden win even if Hayes claimed victory in the three Southern states.

In January 1877, Congress convened a special Electoral Commission to resolve the disputes, and the commission broke 8-7 in favor of Hayes in all four of the contested states. Democrats, undeterred, tried to delay the counting of the electoral votes before the joint session of Congress on Feb. 28, which would deny Hayes a majority and send the election to the House of Representatives. The inauguration was only four days away, and there was a real danger of both parties trying to have their candidate take the oath of office.

Enter Samuel Randall. As the newly appointed speaker of the House, Randall refused to allow members of his party to delay the vote count, which they had sought to do by producing yet another competing slate of electors of dubious origins from Vermont. When Randall rejected these efforts, one of his fellow Democrats tried to physically attack him, and others began reaching for their guns. Randall had to call the sergeant-at-arms to restore order.

Remarkably, Randall halted the delaying tactics that would have increased the likelihood of dueling inaugurations and subsequent violence. His actions brought the count to a nonviolent end March 2, just two days before the inauguration.

Upon becoming speaker, Randall had pledged "absolute fairness to both sides … in exercising the parliamentary powers of the chair." With his decisive action in resolving the disputed election of 1876, he kept that promise, even when doing so required decisions not in his party's interest.

In the end, Democrats acquiesced to the election of the Republican Hayes over their own candidate, Tilden, on the condition that Hayes agree to remove federal troops from the Southern states. Hayes' elevation to the presidency effectively ended Reconstruction and changed the trajectory of American history, but in the months between the election and the inauguration, a nonviolent resolution was far from certain.

In some ways, the disputed election of 2000 was a refresher course on the lessons of 1876. In 2000, Gov. George W. Bush of Texas and Vice President Al Gore were statistically tied in Florida, and the state's electoral votes would determine the next president. The U.S. Supreme Court ended the state's recount, however, on the grounds that the Florida Supreme Court, in failing to set counting standards that would treat all voters uniformly, violated the Equal Protection Clause of the 14th Amendment.

Gore decided not to challenge the Supreme Court's decision, effectively conceding the presidency to Bush. Filing a new case before the Florida Supreme Court seeking counting standards was certainly on the table — even if it was a long shot — yet Gore opted not to do so.

In his concession speech, Gore emphasized that "what remains of partisan rancor must now be put aside," and speaking directly to his supporters, he noted that "disappointment must be overcome by our love of country."

Randall, and to a lesser extent, Gore, illustrate that American democracy, in many ways, survives because of the decisions of individual people, not because of the politics or institutions that often fail us. No matter how many scenarios that election experts game out in anticipation of Tuesday's contest, one can never predict whether there will be a need for another Samuel Randall.

Franita Tolson is the vice dean for faculty and academic affairs at the University of Southern California Gould School of Law. Her book, "In Congress We Trust?: Enforcing Voting Rights from the Founding to the Jim Crow Era," will be published in 2021. She wrote this for the New York Times.