Since the mob attack on the U.S. Capitol on Jan. 6, corporate money has started moving away from President Trump and his Republican allies.

As one reputation management CEO explained, “Whatever good the president did for business now seems to have come at an unacceptable cost, and that cost is anarchy in the streets of Washington.” From JPMorgan Chase and Goldman Sachs to Microsoft and Google, companies are pledging to suspend PAC donations to any Republican who objected to certifying Joe Biden’s win. Walmart also recently announced it would “indefinitely suspend” donations to the GOP politicians who voted against certification. After four years of supporting Trump, big business is now wondering if it should jump ship, and do so quickly, to avoid being caught on the wrong side of history.

This is not the first time in our nation’s history that big business has corrected course at the 11th hour, narrowly escaping condemnation as traitors to America. The actions of Northern businesses in the lead-up to the Civil War reveal that America’s business elite has always had a penchant for Johnny-come-lately opportunism, especially when the stakes are as high as civil war. Then as now, businesses ultimately chose the country over sedition, but they were less committed to the values of justice and equality needed to create lasting change.

On the eve of the Civil War, America’s leading businessmen in New York City were furious about the election of Abraham Lincoln. New York was the richest city in the nation in large part because of its merchants’ ties to Southern enslavers. Cotton exports — produced by enslaved people in the South — enriched the Northern business leaders who transported it, stored it and insured it. If the South seceded from the Union, this profitable trade would be destroyed.

Slavery served Northern business owners’ interests, which was uncomfortably juxtaposed with New York City’s vibrant abolitionist scene. For instance, New York abolitionists and businessmen Arthur and Lewis Tappan tried to persuade their fellow wealthy merchants that slavery was sinful. But the vast majority of New York businessmen were so enmeshed with Southern enslavers they not only ignored antislavery pleas but actively sought to break up antislavery activity in the city. As Southern editor J.D.B. De Bow observed in 1860, New York City was “almost as dependent upon Southern slavery as Charleston.”

In December 1860 when South Carolina seceded — a state whose enslavers had particularly strong ties to New York City — New York’s business elite made a final push to avoid war that included threatening to withdraw financial support from the federal government and proposing that New York City avoid war altogether by seceding as a “free city of itself,” a phrase that came from New York’s original charter. New York Mayor Fernando Wood, a staunchly pro-Southern Democrat, presented the argument for secession to the Common Council in January 1861: “When disunion has become a fixed and certain fact, why may not New York disrupt the bands which bind her to a venal and corrupt master [the Union]” which, he reasoned, has “plundered her revenues” and “attempted to ruin her commerce?”

If Wood’s vision had become a reality, the consequences for the Union would have been dire. Before the days of income taxes, the federal government depended on tariffs on imported goods for its revenue. Since more than two-thirds of the total value of imports passed through New York, secession probably would have emptied Washington’s coffers. The Union would have been scrambling for money. And that’s not even to mention the loss of a highly strategic port.

The moment that changed things for these pro-Southern, pro-secessionist business owners was when a South Carolina militia lay siege to the federal Fort Sumter on April 12, 1861, firing the first shots of the Civil War and engaging in a 33-hour bombardment of the U.S. Army at the fort.

Regarding the actions of the South Carolina militia, a journalist for the New York Times wrote: “The rapid pace of treason was doubtless quickened by this movement, while throughout the loyal North the pulse of patriotism, and of indignation at the Southern boasts, beat high and fast.”

After the firing on Fort Sumter, it became impossible for New York’s business elite to support the South and secession. The outbreak of war intensified pro-Union sentiment and abolitionist activity in the city, including a deluge of fugitive enslaved people escaping to New York to claim their freedom in the midst of patriotic fervor. One Underground Railroad operative said that after Fort Sumter, the organization was no longer needed since “nearly every Northern man” now seemed willing to offer assistance. The ground was shifting beneath New York businessmen’s feet, and they knew it.

This about-face made some people skeptical of the businessmen’s sudden change of heart. Wood offered his services to President Lincoln just days after Fort Sumter. As one of Wood’s contemporaries wrote about him, “The cunning scoundrel sees which way the cat is jumping.” But the cat was indeed jumping.

Motivations aside, the decision of these businessmen to support the Union changed the course of the war. The pro-slavery, pro-White nationalist Confederacy was defeated, at least in part, because of the money and supplies provided by businesses that had been very close to staying loyal to their Southern friends.

After the Civil War, businesses that had joined the Union’s cause out of expediency were, not surprisingly, more likely to emphasize conciliation over justice and restoration of order over democracy. They weren’t committed to the goals of Reconstruction because they were recent champions and beneficiaries of slavery.

Northern businesses’ support helped win the Civil War for the Union. However, as the dark history of Klan terrorism and Jim Crow segregation reminds us, they also diluted the North’s moral commitments to racial justice and equality after the war and undermined political processes that would have created transformative change.

Once again, America’s businesses are seeing “which way the cat is jumping.” But similar to New York merchants who buoyed slavery’s success and defended it until the final hour, America’s business elite have enabled President Trump by turning a blind eye to his dangerous rhetoric until it no longer seemed to serve their interests.

Put simply, corporate America helped create the conditions that led to this month’s horrifying mob attack. They stood by for four years as Trump damaged our democracy and stoked the flames of racism and hatred. And they did so because his policies — like large corporate tax cuts — made them richer.

For now, America’s businesses are choosing the side of democracy. But how will they follow through on that commitment once this crisis has passed? Will they continue to seek an outsized influence in Washington through corporate lobbying efforts that undermine our democracy, or will they consider giving their own employees more of a voice? Will they support politicians who want to quash any remnants of white, right-wing nationalism, or will they emphasize conciliation over justice, just like their forebears did in the aftermath of slavery’s demise?

Being on the right side of history matters. But as the Civil War and its tragic aftermath revealed, a deep and lasting commitment to racial justice and equality is required to secure American democracy.