On Wednesday, at the behest of President Trump, an anti-democratic mob stormed the U.S. Capitol. After years of compromising with Trump, Senate Majority Leader Mitch McConnell (R-Ky.) expressed shock and outrage, denouncing the president for inciting violent insurrection.

In the 1850s, another senator — Stephen A. Douglas (D-Ill.) — spent years appeasing the most extreme elements in his party. Like McConnell, Douglas believed that compromise could temper the extremists’ worst impulses, win major legislative victories and secure his political future.

For both men, compromise worked — until it didn’t. Douglas’s story reveals what McConnell and his fellow establishment Republicans have for too long failed to recognize: On the profound moral questions in American politics — union versus treason, democracy versus autocracy — there is no middle ground.

Douglas was ferociously ambitious. Like McConnell, he served multiple terms in the Senate; he also he sought his party’s presidential nomination in 1852, 1856 and 1860. But — also like McConnell — his party was shifting under his feet. From its inception with Andrew Jackson in the 1820s, the Democratic Party had championed small government and local control. In the late 1840s, however, enslavers ratcheted up their demands for strong federal protections for slavery. As he pursued his fondest goal — westward expansion — Douglas was caught between two opposing impulses. He needed Southern oligarchs’ support to secure a presidential nomination, but he needed his antislavery constituents’ votes to hold on to his Senate seat.

Throughout the 1850s, Douglas triangulated between his Northern constituents and his Southern colleagues. For a time, the gambit worked. In 1850, Douglas ushered a new free state (California) into the Union by promising Southerners a stronger fugitive slave law. In 1854, he secured the passage of the Kansas-Nebraska Act, which opened those territories up to the possibility of becoming slave states. Both laws represented major concessions to Southern enslavers, but the latter was especially unpopular with Northern constituents, many of whom defected to the Republican Party in the ensuing midterm elections. But in both cases, Douglas took credit for opening new lands to White settlement — and saving the Union from breaking apart over slavery. Of the compromise measures, Douglas boasted, “The Union will not be put in peril; California will be admitted; governments for the territories must be established; and thus the [slavery] controversy will end, and I trust forever.”

There were lines Douglas would not cross: In the winter of 1857-58, Douglas refused to comply when a fellow Democrat, President James Buchanan, insisted that Congress ratify a fraudulent proslavery constitution for Kansas.

Yet he willingly countenanced the seditious wing of his party throughout the 1850s, worried that standing up to it would exacerbate sectional tensions and stifle his own presidential ambitions. This appeasement came at a dire cost, ultimately allowing secessionism to gain serious currency among his Southern colleagues. Rather than meeting Douglas in the middle, Southern extremists — dubbed fire-eaters — demanded ever more concessions from their Northern colleagues.

In the election of 1860, Southern Democrats finally split the party in two, demanding slavery’s unlimited expansion and arguing that the election of antislavery Republican Abraham Lincoln would justify Southern secession. Douglas, the candidate of Northern Democrats, spent most of the summer and fall continuing to insist on compromise. But late in the campaign — once he realized Lincoln’s victory in the four-way race was inevitable — Douglas did an about face, traveling to the South in an effort to convince the Southerners to remain in the Union. “The election of a man to the presidency … in conformity with the Constitution of the United States would not justify any attempt at dissolving this glorious confederacy,” Douglas opined.

But his efforts were too late. Extremists had spent years spreading the false claim that Republicans wanted to abolish slavery and the racial order it sustained. A few belated speeches from an Illinois senator could not now convince Southern Democrats otherwise.

Ironically then, Douglas finally and unequivocally set aside political concerns, condemning the undemocratic element in his party — the very thing he had so long resisted doing. But the moral clarity came too late to prevent the worst from happening. Douglas did not temper the extremists’ worst impulses, and ultimately, he could not stop the rush to war.

McConnell’s relationship to the extremists in his party bears a striking resemblance to Douglas’s.

McConnell endorsed Trump after he won the Republican nomination in 2016, but declined to support Trumpism. “He’s not going to change … the views of the Republican Party,” McConnell told one interviewer. “I think we’re much more likely to change him because if he is president, he is going to have to deal with sort of the right-of-center world, which is where most of us are.”

Over the past four years, however, Trumpism consumed the Republican base. Aware of the president’s popularity — including in McConnell’s home state of Kentucky — the majority leader repeatedly refused publicly to censure the president for his racism, sexism, mendacity and demagoguery. In return, McConnell held on to his Senate seat, protected the Republican caucus and secured the hundreds of conservative judicial appointments he sees as his most important legacy.

There were a few exceptions. After Trump praised the white supremacists who had rioted in Charlottesville in 2017, McConnell issued a statement denouncing them. And in December, McConnell broke with the president to acknowledge Joe Biden’s victory in the presidential election.

But McConnell never publicly defied the president as clearly as he did on Wednesday. Channeling Douglas’s condemnation of secession, McConnell told listeners that “public doubt alone” could not “justify a radical break when that doubt was incited without evidence.” And of Trump’s violent supporters who had attacked the Capitol, McConnell proclaimed, “We will not be kept out of this chamber by thugs, mobs, or threats."

But there is one key difference between McConnell and Douglas: McConnell still has the chance to act. Like Douglas, he enabled an extremist movement that rejected core American principles, allowing it to metastasize into a serious threat to the republic. And like Douglas, he has belatedly taken a stand against those extremists. If he goes further, he may still succeed where Douglas failed: in turning back the tide of extremism and salvaging our democracy.