President Lyndon B. Johnson, right, confers with President-elect Richard Nixon in the White House.Charles Tasnadi / AP

Last week, Robert Schenkkan’s new play, The Great Society, opened at the Arena Stage in Washington. This riveting sequel to the Tony-award winning All the Way, about the Lyndon Johnson presidency, is a haunting piece of theater for liberals to watch in February of 2018, when President Trump and the Republican Congress have been swinging a political wrecking ball at Barack Obama’s legacy.

The two plays capture an important lesson about presidential history: that it is possible for the country’s top leader to be an incredibly effective policymaker yet fail politically at building a governing coalition that outlasts them. The costs of this kind of political failure are severe because it leaves everything a president built open to attack. It also leaves little room for continued growth. LBJ saw that happen when Richard Nixon took office in 1968, and now Obama is witnessing the same thing, even worse, with President Trump.

Policy victories combined with political failure is the story of President Johnson that The Great Society captures so well. In the first play, Bryan Cranston brilliantly captured the energy and ambition of LBJ in 1963 and 1964. Broadway audiences were treated to a rollicking performance as they saw Johnson use all the political cunning that he gained during his years in Congress to push a historic civil-rights bill through the House and Senate. Johnson had an instinctive feel for the way that his former colleagues worked. Through carrots and sticks, Johnson figured out a way to move warring sides to the point of compromise. “I got all kinds of federal programs in mind on health, education, literacy, jobs, you name it,” Johnson says in the play. “We’re gonna change this country, top to bottom!”

The civil-rights legislation of 1964 was path-breaking and, in the play, a proxy for the many other measures Congress passed—Medicare and Medicaid, the Voting Rights Act, funding for higher education and elementary schools, the War on Poverty, and more—as part of the Great Society. By the time All the Way ended, with Cranston’s Johnson trouncing Republican Barry Goldwater in the 1964 election, audiences left the theater thrilled as they were reminded of what an effective president can accomplish. In an age of polarized political dysfunction, this was a breath of fresh air. Schenkkan offered hints of the turbulence that was to come, with a scene involving the passage of the Gulf of Tonkin Resolution, which authorized the use of military force in Vietnam, and moments in the 1964 Democratic primaries where you could see a white backlash brewing. Yet overall, the picture of America the play painted was good. It was not a surprise that politicians from both parties filled the seats of the Neil Simon Theater over the course of its three-month limited run on Broadway to catch a glimpse of this new and improved LBJ.

But if audiences thought Schenkkan was going to leave it there, they were mistaken. With the sequel that opens this weekend in Washington, audiences get a firsthand look at the political wreckage that LBJ left behind. In this performance, Jack Willis plays an LBJ who is dealing with fallout from the Vietnam War as he watches everything that he built fall apart. Willis’s LBJ displays a hubris and insecurity that is destructive rather than a source of productive policymaking. He gets deeper and deeper into Vietnam as the show progresses, unable to stop himself as the fragile political coalition he put together starts to unravel by 1967 and 1968. As the protests against the war get louder, and the Black Power movement gains strength demanding that the president should do more to tackle inequality, a conservative coalition of southern Democrats and Republicans push to cut domestic spending. At the same time, the play shows how a white backlash takes hold in cities like Chicago. White protesters storm through the circular stage yelling at civil-rights protesters, “Burn ‘Em Like Jews!” and “Hey! Where’s Martin Luther COON?!”

Despite Vice President Hubert Humphrey (with the actor Lawrence Redmond in a fantastic performance) constantly imploring the president to stop the war and get back to work on domestic reform, Johnson doesn’t listen to his better angel. In The Great Society, Johnson is driven deeper into the war and further away from the liberal forces that were animating the grass roots. His fears of the right cause him to take actions that result in his party’s implosion. Johnson lies so much in the process to survive that he admits not even knowing who he was by the time he announces he won’t run for reelection in March 1968.

“I had this dream about the country,” LBJ says, “What it could be. And it was right there … and whatever it took seemed like such a small thing and so at first you tell yourself, if you think about it at all, that it’s not much of a line to cross—hell, you’ve done it before, or somethin’ like it—maybe even somethin’ worse. You tell yourself, hell, everybody does it. And so you lie. And then you gotta cover that one with another one. And then another. Until one day you turn around and you don’t know where you are anymore, or who you are, and the dream—is gone.”

The political result of this turmoil is exactly what LBJ feared the most: the election of Republican Richard Nixon, who, though moderate by modern standards, sets into motion the conservative revolution that would greatly weaken the will to grow domestic policy and place Great Society programs under continual threat. Key portions of several programs, such as the Voting Rights Act, would not survive. Schenkkan reminds us that Richard Nixon was the Donald Trump of his times when, during an Oval Office meeting with LBJ, he promises to make America great again.

Although few observers compare LBJ to Obama, by contemporary standards Obama was able to accomplish a good deal on the policy front. This is the central finding of my new book, The Presidency of Barack Obama: A First Historical Assessment, in which a group of historians found that that Obama’s policy accomplishments were much more significant than realized at the time. The Affordable Care Act, the economic stimulus, and Dodd-Frank all had a notable impact on economic growth, income inequality, and access to health care. The Justice Department was taking an aggressive approach toward tackling the problem of racism in criminal justice toward the end of his second term. Obama used executive power to push forward substantial changes in climate-change regulation while adhering to an agenda of liberal internationalism overseas that calmed the storms which unfolded under President Bush. There were many areas where Obama’s policy initiatives withered and others he never even tried. But overall, Americans will look back at his presidency to remember a notable package of policy changes that were put into place.

Unfortunately for Obama and the Democrats, his political accomplishments were not as great as his success in policy. Unlike LBJ, President Obama did not get the nation into a disastrous war. However, he too deserves some of the blame for the success of the GOP in 2016. President Obama was often unhelpful to the congressional Democrats, refusing to share his own campaign tools, such as donor lists and activist emails, with the national party. He didn’t spend as much time as was necessary raising money and mobilizing young candidates who could compete for seats on Capitol Hill. He failed to do all of this even as he asked for their help in pushing extraordinarily controversial measures that posed risks to their own professional future. As Republicans undertook a massive initiative to win control of state legislatures and master the redistricting process, Democrats were caught flat-footed and sat still as Republicans built huge majorities in the House, in state legislatures, and in gubernatorial positions. As red states redistricted Democrats out of congressional opportunities, the president did not work with Democrats to counteract these efforts.

Worst of all, President Obama continued to underestimate the ferocity of the new generation of Republicans who were practicing a new style of confrontationist, smash-mouth politics that left little room for compromise with the other party. They were aided by a conservative media universe where reason-based arguments depending on facts and analysis were secondary or irrelevant, as spin, hyperbole, and partisan slander were the weapons of choice. While President Obama was playing chess, more and more congressional Republicans were playing tackle football.

The result was that President Obama left office with Tea Party Republicans in control of Congress and a voice for this generation—Donald Trump—in control of the White House. While Johnson could at least find some relief in the fact that Democrats controlled Congress (although southern Democrats had been reinvigorated by the end of LBJ’s term), President Obama could see nothing but a bleak and dismaying political landscape. Indeed, he himself admitted to the New Yorker’s David Remnick that “We’ve seen this coming. Donald Trump is not an outlier; he is a culmination …”

The threat to his legacy is becoming clearer by the day. While much of the first year of Trump’s term was pretty slow on the policy front, during the last few months President Trump has been gaining strength. The president has slashed taxes, eliminated the individual mandate in the Affordable Care Act, rolled back thousands of regulations on the business and financial sector, ramped up military spending, and is now teeing up to push forward a draconian package of immigration control in exchange for giving Democrats back the Obama-era program shielding undocumented immigrants brought to the U.S. as children that Trump dismantled. Overseas, the president has greatly damaged the strength of international alliances, and given voice to an approach to foreign policy that privileges militarism and unilateralism. These victories will greatly strengthen his political standing, enabling him to go even further.

As Democrats try to figure out what to do with President Trump, they might want to head over to the Arena Theater to get a good reminder of what happens when parties don’t take the right step to nurture their political strength. Policies are only as good or strong as the governing coalition that holds power. If a party hands control of power to the opposing party—as was the case with Obama and LBJ—the consequences could be devastating. Democrats are living through this nightmare for a second time with no end in sight.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.