Barack Obama. Photo: Dan Winters

Barack Obama is one of a handful of presidents with transformative domestic legacies. Some of those presidents, like Franklin Roosevelt and Ronald Reagan, left their office to a chosen successor who carried forward their vision. Lyndon Johnson saw his popularity dissipate in response to a failed war. Abraham Lincoln was murdered, and his successor, Andrew Johnson, was a pro-slavery southern Democrat who abhorred Lincoln’s vision. There is no precedent for a departing chief executive like Barack Obama. Having saved the economy from ruin, reshaped health care and environmental policy, and reformed the financial industry, he leaves office as the most popular politician in America, to be succeeded by a man who has mocked his work, not to mention the legitimacy of his citizenship, and has pledged to destroy it all.

After conservatives spent the Obama years terrified he’d sent their country spiraling into a socialist dystopia, and liberals spent it fretting he had done too little, they are mostly united in their belief that Donald Trump will erase the entire Obama project in the blink of an eye. On November 10, Charles Krauthammer gloated, “Obama’s legacy is toast; it’s gone.” Many liberals quickly arrived at the same conclusion. “What will outlast Trump?” asked John Judis in The New Republic. “We just threw everything out!” But this assumption is too shallow and too confident. It reflects, in part, the conservative fallacy that Obama mostly relied on easily reversible executive orders and the liberal fallacy that he mostly floundered in the face of Republican obstruction. The truth is that Obama enacted careful, deep, and mostly popular solutions to a broad array of problems to which his opponents have no workable response. For all the horrors Trump may yet unleash, the specific changes Obama wrought may prove far more durable than either his gloating enemies or his despairing supporters believe.

Some of these changes are being overlooked or misunderstood today, just as they were when they first were enacted. The 2009 stimulus, for instance, included a tax credit for workers at the bottom of the income scale, the primary purpose of which was to get more cash into the hands of people who could spend it quickly. It succeeded at this task, but it also served a long-term social objective of making the tax code more progressive. In 2015, Obama struck a deal with the Republican Congress to make those tax cuts permanent in return for making permanent a series of supposedly temporary business tax cuts that had been routinely extended for years. Also, in 2013, the administration allowed expiring Bush-era tax cuts on incomes over $450,000 to lapse, which triggered the return of higher Clinton-era tax rates. The combined effect of lower taxes on the middle class and the poor, higher taxes on the wealthy, and Obamacare provisions reduced post-tax incomes for the highest-earning one percent by more than 5 percent and increased incomes for the lowest-earning tenth of households by an average of 27 percent. With vanishingly little attention, Obama had moved the needle against income inequality.

Ever since the Reagan administration, Republicans have spent every ounce of their political capital on shifting the tax burden off the rich and onto everybody else, and Trump is very likely to sign into law a big tax cut for the rich. But Republicans will have a harder time undoing Obama’s tax cuts for struggling Americans, and the harder they work to reward the rich at the expense of the poor, the more they will scuff up Trump’s self-styled image as the enemy of the elite. The energy they exert on erasing Obama’s tax policy will come at substantial political cost.

Obama had hoped his successor would accelerate the clean-energy revolution he began, a plan obviously foiled by the election of a president who has deemed climate science a Chinese-authored hoax and has pledged to eliminate all federal regulation of greenhouse-gas pollution. Unlike other extreme positions Trump has taken, most of which would inflict immediate harm on many Americans, his opposition to any policy to slow climate change stands a good chance of remaining in place because its effects will sink in long after he departs. Containing climate change ultimately requires not just continuing Obama’s policies but expanding and deepening them, ultimately weaning the economy off carbon altogether. The most hopeful scenario, which had finally come into view at the end of Obama’s term, was rendered moot by Trump’s election. And the damage wrought will likely be irreversible: A glacier cannot easily be unmelted.

This does not mean the task of sparing the planet from the worst effects of runaway global warming is hopeless, though — or that Trump can nullify what Obama accomplished. Trump’s promise to bring back coal-mining jobs by eliminating regulations is a fantasy. Natural-gas power plants have replaced coal at a rapid clip in part because they are now dramatically less expensive. And thanks to $90 billion in investments from the stimulus, and incentives that were extended during the 2015 tax deal, green technology has grown dramatically more effective and affordable. Since Obama took office, wind-energy prices have fallen by 66 percent, utility-scale solar-energy prices by 75 percent, and electric-car-battery costs by 65 percent. In much of the country, zero-emission electricity is cost-competitive even with natural gas. Conservatives will not want to pay higher electricity bills just for the privilege of emitting more carbon dioxide.

Nor will Obama’s diplomatic achievements disappear. In 2014, he agreed to a sweeping bilateral climate pact with China, setting the stage for the breakthrough Paris climate agreement the following year. Trump has promised to withdraw from the agreement, but it is possible that even if he does, it will be too late for him to scuttle its progress. American states and cities — most notably California — have already begun efforts to reduce their emissions beyond what Washington has required. And since American power plants have already met their 2024 emissions-reduction targets under the Paris agreement, a case could be made to the world that America has upheld its end of the bargain and the agreement could remain in place. Many developing countries can now build a new solar plant at lower cost than one using fossil fuels. Trump may slow the pace of diplomatic and technological change that Obama’s green-energy revolution began, and that slowing will have horrendous consequences, but he will not reverse it.

And then there’s Obamacare. In keeping with his party’s animating impulses, Trump ran for president calling it a “disaster.” But many Republicans privately recognized the law was anything but. Even in the face of hysterical Republican resistance and outright sabotage, the law has reduced the ranks of the uninsured by 20 million and come in well under budget (the federal government by 2016 was spending less on health care than it was projected to spend before Obamacare passed). Insurers eager to sign up customers initially set prices too low, and when premiums rose sharply last year, Republicans triumphantly claimed the law’s new exchanges were headed into a “death spiral” of rising prices and fleeing customers. But newer evidence has suggested otherwise, as rates have floated back to the levels originally projected by the Congressional Budget Office. In the fall, new customers flocked to sign up for the exchanges, bringing up enrollment. A financial analysis by S&P predicted that the premium increases were a onetime pricing correction and that 2017 “will likely see continued improvement” for insurers.

This means that Republicans eager to tear up Obama’s signature accomplishment will have to rip away coverage from millions of Americans who rely on the law for their medical care (and, not incidentally, penalize the doctors, hospitals, and insurers who make a living selling it to them). During the campaign, Trump promised to replace the law first with “something terrific,” which he frequently assured audiences would take care of every American’s medical needs at much less cost. It seemed obvious that the candidate lacked even a cursory understanding of how the law worked, what changes he would bring about, or how he could possibly fulfill his promise of fabulous medical care for all. Once elected, Trump told reporters he wanted to maintain the law’s protections for patients with preexisting conditions. Possibly the incoming president failed to grasp that these safeguards required the other elements in the law in order to function. Perhaps he was misleading the public about his support.

Either way, he did understand a simple political logic: It is easy for politicians to block new benefits, but difficult to strip away existing ones. The Republican plan to eliminate Obamacare has appeared to be: Vote to repeal the law; delay the actual repeal for a long time; and then, allegedly, create an Obamacare replacement. “Repeal and delay” sounds attractive in theory, but it presents Republicans with enormous political risks. If they pass a law with no replacement in hand, insurers and hospitals will face huge financial losses, and this will probably disrupt coverage for millions of their customers. The only way to prevent such a catastrophe will be to shore up the system until Congress devises a replacement. But patching up Obamacare will enrage conservatives who oppose “bailouts” for the insurance industry and will also demonstrate that Obamacare can work. Republicans, like Colonel Nicholson in The Bridge on the River Kwai, will have built the thing they had set out to destroy.

Recently, a growing number of Republican, or Republican-friendly, voices have turned against the repeal-and-delay strategy. Even the president-elect has warned Republicans to “be careful,” lest they be blamed for the chaos that repealing the law would create. But they have no attractive option at hand. Obamacare can be defunded with 50 Republican Senate votes, but replacing it requires rewriting the insurance regulations in the law, which needs 60 Senate votes, or at least eight Democrats. Republicans could try to negotiate with Democrats on changes to the law that would make it more Republican-friendly — taxing rich people less, skimping on subsidies to the poor and sick, lowering premiums for the rich and healthy — that they could call an Obamacare “replacement.” If the changes were small enough, and they left most of the law’s achievements in place, Democrats might accept them in return for a truce in the health-care wars. But there’s no course of action for Republicans that avoids taking on high levels of political risk. They have made impossible promises on Obamacare and are quickly finding themselves stuck in a political quagmire.

Many other elements of Obama’s legacy will prove difficult or impossible to reverse permanently. The Trump administration will almost certainly refuse to enforce as intended the Dodd-Frank act, which dramatically curtailed risk in the financial system. But this is the standard approach by a Republican presidency toward regulations it dislikes but lacks the votes to overturn. Republican administrations inevitably refuse to enforce labor law, environmental regulations, workplace protections, and so on. Dodd-Frank will fall into the same category. And when a Democrat (or perhaps a moderate Republican in a chastened future party) returns to 1600 Pennsylvania Avenue, the legacy of these reforms will be renewed without having to wait or hope for congressional approval. The actions Obama took to save the economy — fiscal stimulus, a bank restructuring, and an auto bailout — cannot be undone. And the almost completely unnoticed reforms to education unleashed by the “Race to the Top” grants tucked into the stimulus continue to drive innovation and better results in public schools.

Obama’s reactionary opponents wish to nullify his legacy not because it changed little but because it changed so much. Any large-scale reordering of power and resources in American life will inevitably face resistance, sometimes for decades. After Lincoln managed to ban slavery, southern states launched a violent terrorist counterattack, disenfranchising their African-American citizens, subjecting them to constant physical terror, and forcing them into exploitative labor arrangements almost tantamount to slavery. Conservatives never gave up their hatred for Franklin Roosevelt’s reforms, and the war against New Deal programs has never ended. (As recently as 2005, Republicans were trying to privatize Social Security.) Republicans continue to attack jewels of Lyndon Johnson’s legacy, like Medicaid and the Voting Rights Act. Sweeping reforms create powerful enemies who do not disappear. As Obama warned in a 2014 speech at the LBJ Presidential Library, “History travels not only forwards; history can travel backwards, history can travel sideways.”

Trump may very well destroy the underpinnings of a system of government put in place more than two and a quarter centuries ago, and if he does, it will be not only Obama’s legacy that is repealed but the legacies of every president from Washington onward. But the future is not predetermined. It depends upon our actions and choices. Protecting, fulfilling, and, in some cases, restoring Obama’s legacy will require mustering the political will to rally around it. If Obama’s supporters defend the pillars of his legacy, rather than fatalistically accept their destruction, they stand a good chance of warding off the most frontal attacks. And where they fail, and Obama’s achievements are repealed, then they can set out to repeal the repeal when the opportunity presents itself.

And it will. Previous generations of Americans knew times when it seemed impossible to imagine slavery might be abolished, women given the right to vote, business subject to any government regulation. Progress tends to come in great dramatic bursts of action and then recede. Barack Obama’s presidency represented one of those great bursts. His was a vision and incarnation of an American future. His enemies long to restore a past of rigid social hierarchy, with a threadbare state that yields to the economically powerful. He, not they, represents the values of the youngest Americans and the world they will one day inhabit.

Excerpted from Audacity: How Barack Obama Defied His Critics and Created a Legacy That Will Prevail, by Jonathan Chait. To be published January 17 by Custom House, an imprint of William Morrow. Copyright 2017 by Jonathan Chait.

*This article appears in the January 9, 2017, issue of New York Magazine.