In 2000, Barack Obama had just lost a congressional race and was feeling blue. So when a friend suggested that he head to the Democratic National Convention in Los Angeles to be among like-minded, energetic people, he jumped at the chance. By the president’s telling, the trip was a disaster; his credit card was rejected at the rental car counter, his convention pass only allowed him to mill in the hallways, far from the action, and no one would let him into the parties.

“Bouncers would be standing there saying, ‘Who’s this guy?’” Obama said. “‘He doesn’t have the right credentials.’”

Certainly, the young, progressive Obama was somewhat out of place in a Democratic Party coming off eight years of Bill Clinton’s centrist “New Covenant,” which he and the party had entered into in 1992, when Clinton accepted the nomination at Madison Square Garden and asked Democrats to be “old-fashioned Americans for a new time.” Writing of that convention and Clinton’s vision, Joan Didion noted that “no hint of what had once been that party’s nominal constituency was allowed to penetrate prime time, nor was any suggestion of what had once been that party’s tacit role, that of assimilating immigration and franchising the economically disenfranchised. … Jesse Jackson and Jimmy Carter got slotted in during the All-Star Game.”

Twenty-four years after Clinton’s speech, smack dab in the middle of Tuesday-night prime time, President Barack Hussein Obama gave his farewell address before a crowd of adoring thousands in Chicago. A black man, the son of an immigrant, a product of Hawaii, Indonesia, New York, Boston and Chicago, Obama stood before the assembled crowd and recited a litany of his accomplishments.

“If I had told you eight years ago that America would reverse a great recession … that we would win marriage equality and secure the right to health insurance for another 20 million of our fellow citizens — if I had told you all that, you might have said our sights were set a little too high,” Obama said to the crowd of Democratic faithful.

All this had been accomplished in a country that seemed increasingly open to the Democratic Party’s ideas: At the beginning of Obama’s term, 44 percent of Americans thought marijuana should be legal; by the end of his time in office, 60 percent thought so. Support for same-sex marriage skyrocketed. In 2015, 45 percent of Americans said they leaned Democrat, compared to 42 percent who leaned Republican, and Hillary Clinton won the popular vote by nearly 3 million.

So why did the Democrats lose the 2016 presidential election? Why, even as Obama spoke, was there a newly expanded Republican majority in Washington working overtime to gut his hallmark healthcare law? In his eight years in office, Obama oversaw the rapid erosion of the Democratic Party’s political power in state legislatures, congressional districts and governor’s mansions. At the beginning of Obama’s term, Democrats controlled 59 percent of state legislatures, while now they control only 31 percent, the lowest percentage for the party since the turn of the 20th century. They held 29 governor’s offices and now have only 16, the party’s lowest number since 1920.

A look back at the Obama era shows that the party’s big-tent message was both working and backfiring at the same time. The raw numbers seemed to add up to Democratic power, but in American politics, two plus two can add up to four — or, just as easily, to being up crap creek in a leaky canoe. The same national trends that allowed Obama to win two terms — and Clinton to win the popular vote in 2016 — hurt Democrats in statehouses, governor’s mansions and congressional districts.

Obama was in many ways the embodiment of a series of long-term trends in the party. A relatively young man at 47, his campaign was bolstered by millennial enthusiasm in a party that had been growing younger since the 1990s. He was black at a time when the party was less white than it had ever been. He came up in politics in a city while the Democrats were increasingly finding their electoral edge in urban areas. And he was proudly progressive in a party whose membership was becoming more and more comfortable with identifying itself as lefty.

Obama didn’t unleash changes in the Democratic coalition that constrained their power outside city limits and hampered their down-ballot success — he was a product of them.

Now, as the Democrats rend their hearts and garments, the biggest question they must consider is what can be done to harness the potential of those already assembled under the tent, balance their geographically lopsided coalition, and do so during a time of pitched racial and economic debate.

Obama’s historical singularity as the nation’s first black president has led some to speculate that he both attracted a new kind of Democratic voter and started a backlash against the party that ultimately led to the election of Donald Trump. But the most dominant trends reshaping the face of the party in fact predated Obama’s election.

While the GOP became older and whiter in recent years, the Democrats made striking inroads with young and minority voters. “They brought Obama to power,” said Howard Dean, former governor of Vermont and 2004 presidential candidate. “I woke them up with my campaign, but they brought Obama to power. Obama was much more disciplined and his campaign was much more disciplined than mine was, and what they saw in Obama was themselves — the first multicultural generation in the history of the country.”

Indeed, while 18-to-29-year-olds were about equally likely to self-identify as Republicans as they were to call themselves Democrats during the 1990s, by 2014, young people were identifying as Democrats over Republicans by a 20 percentage point margin, the party’s largest edge among young voters since the 1970s. In 2016, SurveyMonkey found that 19 percent of Clinton’s 2016 vote came from 18-to-29-year-olds; 10 percent of Trump’s vote came from the same demographic. Building the party with younger and more diverse voters opened the Democrats up to a turnout problem, though. Older, white Americans — the kind increasingly finding their home in the GOP — are more likely to vote than young people of color.

While the party was getting younger, it was also growing more diverse. The share of self-identified Democrats who were nonwhite remained on track with the broader demographic shift the country has been undergoing — a trend that started well before Obama took office. Both parties recognized that the Democrats were winning a long-term political battle in a country where a majority of the population will be nonwhite by 2044. Sixty-four percent of Democrats were white in 2000; that number dropped to 57 percent in 2008 and 53 percent in 2014. (Seventy-four percent of American adults overall were white in 2000, dropping to 64 percent in 2014.)

But perhaps the most concrete legacy of Obama’s presidency within the pantheon of Democratic administrations was his reinvigoration of a progressive public image of the party. Coming off the George W. Bush years, Obama wanted to “redefine patriotism as all the things that we believe in,” according to his former speechwriter Jon Favreau.

In 2001, most Democrats — 47 percent — identified themselves as “moderate,” while only 30 percent said they were “liberal.” By 2016, the proportions were reversed, with 44 percent of people within the party calling themselves “liberal” and 41 percent calling themselves “moderate.”

“I was thinking about this this morning as I was on my lengthy morning walk,” Dean told me on a recent Friday. “Clinton really was a president of his time, and his major contribution was to head off the right-wing revolution which [Newt] Gingrich had fomented.” Obama, Dean said, “moved the country in a more progressive direction, not so much because Obama is more progressive than Clinton but because Clinton had done a lot of the work that kept the Democratic Party alive so that we could have an Obama.”

While the liberalizing trend within the party steadily gained strength during the Bush era, it accelerated under the 44th president.

The share of “very liberal” voters who turned out in the 2016 primaries compared to the 2008 primaries rocketed up as well. And these Democrats were voting for candidates who shared their values. From the grassroots to the men and women in dull Washington suits, the Democrats were embracing a more progressive vision of the country.

But the big-tent philosophy brought challenges for Democrats ideologically and electorally. “We have to unite the undocumented abuela with the treehugger from Oregon with the criminal-justice advocate from Detroit with the anti-Wall Street small farmer from Iowa with the trans woman from Florida,” said Heather McGhee, president of the progressive think tank Demos. “Creating a forceful, coherent progressive vision in an age of racial, economic and political inequality is more challenging than the conservative project of small government and lower taxes.”

Recent years have seen Democrats rapidly lose ground with white non-college-educated voters, and the party no longer competes in Appalachia and the South.

This wasn’t always the case. In 1992, the year Bill Clinton drawled about a “place called Hope” in Arkansas, he won that state in his race for the White House, along with Kentucky, Missouri, Tennessee and West Virginia. Clinton won them again in 1996, but no Democratic nominee has done so since. (Those states, plus Oklahoma, were on average 1 percentage point more Republican than the nation overall in 1992; by 2016, they were 33 points more Republican than the country.)

This loss of support in large swaths of the country, exacerbated by gerrymandering and laws making it more difficult to vote, has had major repercussions, and Democratic votes are now less efficiently distributed than Republican ones, clustered in coastal states and urban areas.

“We took our eye off the ball,” Rep. Tim Ryan, who represents Youngstown, Ohio, said of the party’s waning popularity in certain parts of the country. “We stopped being a big-tent party as far as going aggressively out to rural America and being there, being present there, listening, learning, recruiting candidates.”

These forces — the same ones that turned Clinton’s popular-vote win into an Electoral College loss — have hurt Democrats in Congressional and state races.

“The Democratic Party is at its lowest point in my lifetime,” said Mark Longabaugh, a senior strategist on Bernie Sanders’s campaign. “I don’t know how you walk away from that fact.”

But the Democrats’ diminished power can’t be pinned entirely — or even mostly — on Obama. The number of congressional seats lost during his tenure is high but in line with what other two-term presidents have experienced. Where the party has ceded an extraordinary degree of its power is in state legislatures and governor’s mansions. If the blame for Democrats’ ebbing power fell squarely at Obama’s feet, the party’s losses in federal offices would likely be much more acute, matching the dramatic changes at the state level.

It matters, too, how the Democrats’ losses during Obama’s tenure are counted. Most analyses compare the number of seats Democrats held after the 2008 elections to those they held after 2016. But Obama’s 2008 election saw a surge of down-ballot Democratic wins, which makes the slide look that much more precipitous. If you compare the number of Democratic seats held after the 2006 midterms, prior to Obama’s election, with the number held after 2016, when he was off the ticket — as the Atlantic’s Ronald Brownstein has suggested — the loss of state-level seats is closer to the norm.

Democrats saw a similar erosion of power after Clinton’s time in office, and by this accounting, Republican losses in the Senate and House during Bush’s tenure look far worse than Democratic losses during Obama’s. Structural issues, not just the man at the top of the party food chain, appear to share the blame.

So what’s next for Democrats? The party’s political relevance depends on wrangling the factions of the big tent and working toward something resembling a comeback. But it won’t be easy. Democrats must grapple with lingering dilemmas about race and how to craft messages that appeal to both voters of color and those voters with less-than-progressive views on America’s inevitable demographic change. What’s more, the party needs to strategically rebuild after Obama’s by-his-own-admission vision-deficient tenure as party leader. “I am a proud Democrat, but I do think that we have a bias towards national issues and international issues, and as a consequence I think we’ve ceded too much territory,” Obama said in a December interview. “I take some responsibility for that … how do we do more of that ground-up building?”

Democrats’ most complex problem is with race. Inextricably intertwined in the party’s loss of political power — even as it made demographic strides — are uncomfortable questions about the deep racial divide that lingers in its broader traditional coalition. Many Democrats blame the party’s state-level approach and fundraising challenges for their losses, but what’s trickier and more fundamental is that the business of appealing to the abuelas or trans women might make some of the white, anti-Wall Street small farmers uncomfortable or downright angry.

Some research shows that Obama’s very presence as a black man in the White House and as a leader of the party appears to have racialized issues for voters in a new way, pushing many white voters, particularly those without a college degree, toward the GOP. Perhaps the Democrats should have done more rural outreach, but there were broader, more deep-seated forces working against them as well.

In Ryan’s view, the Democrats just stopped trying to win over certain voters, ones who they felt had perhaps been lost to the other side of the American culture war, which has been raging for longer than the Plantagenets were ever at it and which in 2016 featured a renewed battle over police violence.

“I think people got enamored with this idea that we could slice and dice the electorate up and run the numbers up with African-Americans, run the numbers up with Latinos and rich liberals and we’re somehow going to be able to piece together a victory,” Ryan said. But “if I don’t fit in your little political calculus then you just ditch me? That’s what people hear.”

Ryan is quick to say that Democrats need to appeal to the working class of “all colors, not just white,” but implicit in his upstart challenge to Nancy Pelosi in the House leadership election in November was the idea that Democrats needed new faces, ones that would help them win back voters that Trump had wooed away. “We’re seen as hostile to their culture, their religious beliefs, their excitement about hunting and fishing,” Ryan said.

But the party’s hand-wringing over its loss of working-class whites has brought pushback as well: Many in the party, particularly people of color, resent that white voters who have abandoned the party are eliciting an energetic outreach campaign while the concerns of reliable Democratic voters in minority communities are ignored.

“African-Americans, no matter what, will vote hook or crook for Democrats, and so that particular demographic is owed a lot more by the Democratic Party than what we have gotten,” said former Ohio state senator and Sanders surrogate Nina Turner. “And what I mean by that is no African-American woman has ever been governor in this country. Democrats need to be making sure that happens.”

Many in the party believe that strategic focus on state-level races of all stripes, after Obama-era failures on that front, is vital to the party’s effort to rebuild its raw national power. Turner and Ryan both say new talent at the state level is key to conveying the party’s message, particularly in places like their home state of Ohio, where certain areas continue to struggle economically even as the national economy makes strides toward recovery.

“We have a social and economic leadership problem in the Democratic Party,” Turner said. “I want them running more people who come from families who struggled and who themselves are still struggling. Let’s run more people like that on the local, state, and, my god, the federal level because they can relate through experience.”

Ryan said that Democrats needed to be more willing to accept candidates who didn’t adhere to the party line on every issue. The party needed to look for allies, not heretics. “There’s gonna be pro-life, pro-gun Democrats,” he said, recalling that when he came to the House in 2003 there were scores of Blue Dogs, a nickname for the party’s more socially conservative caucus. “I would disagree with them on those issues, but they voted for a Democratic speaker and we did great things.” The central question for political success going forward, Ryan said, is, “Do we want to do great things, or do we want to be purists?”

This renewed focus on bench-building has attracted a lot of attention to the election for the chair of the Democratic National Committee, which will take place in late February. The race has given Democrats a chance to air their grievances about the party’s approach to state-level races, fundraising and talent searches. “We lost our way as Democrats,” Turner said. “We got caught up with the shiny object that is the president.”

Dean, a former party chairman, agreed. “The DNC always becomes a completely Washington-centric organization when we have our own president — basically the place is run by the political director of the White House, not the chair, and it’s all about re-electing the president,” he said. “You probably ought to move the DNC to Dallas or someplace and get it the hell out of Washington.”

The problems of the party were, in other words, ones of isolation from core constituencies. Digital proximity through viral inspirational videos shared on increasingly polarized Facebook and Twitter newsfeeds is not the same as old-fashioned press-the-flesh politicking. “We didn’t do any of the grassroots work over the eight years that Barack Obama was president,” Dean said of the party under a leader who had once been a community organizer. Organizing For America (later Organizing for Action), the project intended to rally the president’s supporters primarily around health care and the Affordable Care Act, was, in Dean’s estimation, “a huge mistake.”

In bringing Obama to power, Democrats understood the importance of not just his proud progressivism but his distinct identity and the certain mythology that would come to surround him. He was a candidate who not only had the right message for the party, but who seemed anointed by the political gods.

“It’s much harder to rally people around a cause than it is around an individual who’s charismatic,” Dean said. What the Democrats had accomplished on such a grand scale at the national level — connecting that Obama charisma to concrete policy — they failed to replicate in the states.

And that, Dean said, “Was just a fundamental misunderstanding of how human beings work.”