The past isn’t a road map to the present — or even a travel guide — but there’s tremendous value in knowing how our predecessors tackled the challenges of their era. The period of the early American republic, in particular, was a fierce and fractious time in our political history, with highly charged debates over the very foundation of self-rule and constitutional government. Over the last week, I’ve written about the judicial battles of Thomas Jefferson’s first term and the constitutional conflict behind the Missouri controversy of 1819-21. To conclude this brief cycle of columns, I want to take a look at the first and most consequential electoral crisis in American history: the election of 1800.

On Dec. 3 of that year, the 138 members of the Electoral College gathered in their respective states to choose between Thomas Jefferson and the incumbent John Adams for president of the United States.

The last two years had been among the most tumultuous in the life of the young nation. Rising tensions with France brought paranoia, anti-French feeling and fears of armed conflict. It was against this backdrop, in 1798, that President Adams and the Federalist Party turned their eyes toward their Democratic-Republican critics in the press.

Faced with public contempt and slander in a society where politics were still personal and where, historian Gordon S. Wood notes, “the honor and reputation of the political leaders seemed essential to social order and stability,” a Federalist-led Congress passed the Sedition Act, criminalizing opposition in the name of fighting French Jacobin subversion.

“I cannot but be of the opinion,” Adams wrote a month after signing the bill, “that the profligate spirit of falsehood and malignity are serious evils, and bear a threatening aspect upon the Union of the States, their Constitution of Government, and the moral character of the Nation.”

The Sedition Act came on the heels of the Alien Friends Act, the Alien Enemies Act and the Naturalization Act, all of which were aimed at a purported French revolutionary conspiracy to organize, as the Federalist congressman Harrison Gray Otis of Massachusetts said, “bands of aliens as well as their own citizens, in other countries, to bring about their nefarious purposes.”

The Friends Act, in particular, gave the president the power to expel, without due process, any “alien” judged “dangerous to the peace and safety of the United States.” To save the nation, Federalists would wield the state against foreign outsiders and domestic opponents, lest they poison the republic with their radicalism.

The Democratic-Republicans were appalled. Jefferson, then vice president, believed the federal government under Adams had become “more arbitrary and has swallowed more of the public liberty than even that of England.” The Federalists, he said, had begun an “experiment on the American mind to see how far it will bear an avowed violation of the Constitution.”

James Madison — Jefferson’s longtime friend, ally and neighbor — similarly believed that the Federalists were seeking to “transform the present republican system of the United States, into an absolute, or at best a mixed monarchy.”

Jefferson, Madison and their followers countered with resolutions, drafted for the Virginia and Kentucky legislatures, in which they laid out a state-centric view of American union. As written by Jefferson, historian Susan Dunn explains in “Jefferson’s Second Revolution: The Election Crisis of 1800 and the Triumph of Republicanism,” the Kentucky Resolutions, “had stated that the federal union was a compact among states and that if any acts of the federal government went beyond that government’s delegated powers, states had the right ‘to nullify of their own authority all assumptions of power.’”

Madison didn’t go as far as nullification in his Virginia Resolutions, but he still argued the point that “states could judge for themselves the constitutionality of acts of Congress.”

This was the climate in which Federalist and Democratic-Republican partisans fought the 1800 election, both sides convinced that the other would unravel the American experiment and bring the republic to either anarchy or despotism. As a Federalist pamphlet called “A Short Address to the Voters of Delaware” asked: “Let these men get into power, put the reins of government into their hands, and what security have you against the occurrence of the scenes which have rendered France a cemetery, and moistened her soil with the tears and blood of her inhabitants?”

The Electoral College made its decision, the future of self-government seemingly in the balance. And when the votes were tallied and announced, the Democratic-Republicans had won the election, 73 for Jefferson to 65 for Adams. But there was a problem. The framers did not anticipate political parties, and the Constitution did not make room for them. Jefferson and Adams had running mates, but there was no way for electors, who each had two votes, to back a ticket without causing a tie. Instead, the winning party’s electors had to carefully cast one vote for a losing candidate, so that the running mate could come in second place and claim the vice presidency.

The Federalist electors were disciplined and coordinated enough to make this happen. Adams won 65 electoral votes and his running mate, Charles Cotesworth Pinckney of South Carolina, won 64 votes, with the spare vote going to John Jay of New York. Republican electors, on the other hand, gave 73 votes each to Jefferson and his running mate, Aaron Burr. This sent the election to the House of Representatives, where each state delegation would cast a single vote to decide the winner.

Jefferson may have won the election, but the lame-duck Federalist Congress would decide his fate. And those Federalists saw an opportunity to keep their worst enemy out of high office. They wouldn’t try to negate the will of the legislatures and voters who chose a Democratic-Republican for president, but they would vote to give Burr the top spot. Here is Dunn: “The reasons for supporting Burr, admitted Theodore Sedgwick, ‘are of a negative nature.’ Burr was ‘not a Democrat … not an enthusiastic theorist … not under the direction of Virginian Jacobins … not a declared infidel.’ He was selfish, pronounced Sedgwick, transforming unfettered self-interest into a virtue.”

Burr, for his part, neither rejected the overture nor did he say he would resign the office if elected.

Republicans in the House were united in support of Jefferson. But this meant gridlock, and after that, the unknown. “What will be the plans of the Federalists,” wondered Albert Gallatin, a Democratic-Republican congressman from Pennsylvania. “Would Federalists elect Burr? Would they call for new elections? Would they force a stalemate and then hand power over to one of their own?” He continued, “Would there be civil war? Resistance? Shall we submit? And if we do not submit, in what manner shall we act ourselves?”

The deadline to pick a president was March 4, when Adams would leave office. On Feb. 11, 1801, the House met to decide the election. To win, Jefferson needed 9 of 16 votes in his favor. Although confident, Jefferson also wrote that “the defects of our Constitution under circumstances like the present, appear very great.”

On the first ballot, Jefferson won eight delegations. Burr won six. Two states, Vermont and Maryland, couldn’t decide, which sent the House to a second ballot, then a third, then a fourth. By nightfall, they were still voting, both sides refusing to budge. “If our opponents will not take Burr,” the Federalist Roger Griswold of Connecticut wrote, “they shall take nobody.”

The House cast 36 ballots over seven days before it came to a decision. The representatives from Vermont and Maryland were still divided on their choice for president, but rather than drag the fight out further, Federalist holdouts in both delegations abstained. Their Democratic-Republican colleagues then cast their states' votes for Jefferson. With 10 votes to 4 for Burr (two states chose not to vote), Jefferson had finally won the presidency. No Federalist congressman voted in his favor.

The United States had faced, and survived, its first constitutional crisis. The question is how. Some of the credit goes to Jefferson’s allies, who assured Federalists lawmakers in the House that the Virginian would preserve some Federalist policies and retain some Federalist officeholders, clearing the way for a resolution in Jefferson’s favor. Some of the credit goes to the president-elect himself, who in the wake of his win used his inaugural address to lower the temperature of partisan politics and affirm the bonds of union. “Every difference of opinion is not a difference of principle,” he wrote." We have called by different names brethren of the same principle. We are all Republicans, we are all Federalists."

But a good deal of credit goes to the Federalist Party as a whole, both in and outside of Congress. They fought, they lost and then they stood down. There would be no violence, no coercive attempt to subvert the constitutional order. Besides, after holding power for 12 years and then losing it, the Federalists could see that nothing was permanent: not victory, not defeat.

This is important. Of all the elements self-government needs to survive, it’s this awareness — the knowledge that power wanes, for you and your opponents — that matters most. When a democracy loses this awareness, when there is a party or a faction or even a demographic that refuses to admit or accept defeat, it finds itself on life-support, risking terminal decline.

Jamelle Bouie

Jamelle Bouie is an Op-Ed columnist for The New York Times.