PHILADELPHIA — After a long day of tensions and booing, Democrats finally found some semblance of party unity.

The 2016 Democratic National Convention opened in chaos, as Democratic National Committee Chair Debbie Wasserman Schultz was forced to resign after hackers leaked internal emails showing that the DNC staffers had privately discussed trying to undermine Bernie Sanders. It continued with a handful of Bernie delegates booing on the convention floor every time Hillary Clinton’s name was mentioned.

But the chaos didn’t persist through the night. The turning point arguably came when comedian and Sanders supporter Sarah Silverman brought the house down with the line that the Bernie or Bust movement was "being ridiculous." And the convention crowd rallied from there.

Michelle Obama said, "There is only one person who I trust with that responsibility, and that is our friend Hillary Clinton," and people cheered. Elizabeth Warren called Donald Trump ‘‘the kind of man who must never be president,’’ and people cheered. Bernie Sanders said, "Hillary Clinton must become the next president of the United States," and people cheered.

If whoever leaked the DNC emails (some signs point to Russian hackers) was hoping to create turmoil within the Democratic Party, their timing couldn’t have been worse. Donald Trump has already galvanized the Democratic Party at its elite level to unify. Now the stage is set for the convention to bring along the grassroots — and become a turning point in the campaign.

The key question that remains is whether Democrats can move forward with a unified base and make an affirmative case for Clinton to the rest of the country.

Why the Sanders delegates were so restive

The most striking thing about the early convention chaos on Monday afternoon and early evening is how genuinely unexpected it was.

On Monday morning, Clinton campaign staff and convention personnel were legitimately worried that Schultz would insist on speaking, get booed, and thereby exacerbate the weekend’s story rather than letting Clinton get on with her message. Then when Schultz gave in and declined to speak, a sense of complacency among the establishment set it.

And so, at a happy hour downtown, miles from the convention center, establishment figures were surprised and alarmed to learn that the dull late-afternoon program was going off the rails — with Sanders delegates on the floor booing every time Clinton was mentioned.

The problem: Sanders had little control over his delegates, who seemed unwilling to get behind his endorsement of Clinton. This was in part a matter of sloppiness on the part of Sanders’s team in selecting delegates. But as one operative told me, there was another reason Sanders’s delegation was so unruly: Everyone was so afraid to cross Clinton by serving as a Sanders delegate that he couldn't convince the kind of party loyalists who normally take the job to do it.

Instead, many Sanders delegates come from the world of left-wing protest culture rather than party politics. And on the floor of the Wells Fargo Center, they acted like it.

This may be one reason Silverman’s speech resonated with these boisterous delegates whereas earlier politicians’ speeches tended to alienate: She's an outsider too.

Democratic leaders have too much to lose for division

There are clearly gaps within the leadership ranks of the Democratic Party. You see these not only in the remaining policy disagreements between the Sanders and Clinton camps but in the marked difference in tone between the optimism of a Cory Booker and the dour tone of an Elizabeth Warren.

But for the leaders of either faction, the stakes are simply much too high to allow infighting to sabotage them. Sanders himself is a deeply serious person who toiled for years in obscurity to move the ball forward on his issues, and whatever his more impulsive supporters may feel, he has no intention of throwing everything away in a fit of pique.

What’s more, unlike the GOP, the Democrats have no redoubt to which they can retreat if they lose the election in November. A Republican in the White House would swiftly replace Antonin Scalia on the Supreme Court and unite all the branches of government — along with the vast majority of state governments — under conservative control. Republicans with doubts about Trump can rationally hope to weather the storm of a Clinton administration and come back in 2020. If Democrats lose, they’ll hit rock bottom.

Democrats have started unifying. But can they reach outside the party too?

As an exercise in party unity, Monday started out rocky but ended in triumph. But it was very much an intraparty dialogue. A range of speakers from the Sanders faction made the case for Clinton, and a range of speakers from the Clinton faction made the case against apathy.

What speakers didn’t do was speak to America’s less ideological swing voters. Based on what we see of polling so far in the 2016 race, these voters largely accept the case against Donald Trump — he’s the most unpopular nominee of all time. But they remain leery of Clinton, who is seen as a dishonest and out-of-touch personality.

Democrats will obviously continue to press the case against Trump throughout the campaign, including here in Philadelphia. But the convention is probably the party’s last best chance to improve the public’s view of Hillary Clinton — a person who was in fact held in high esteem when she was secretary of state.

As Ezra Klein has written, the people who’ve worked directly with Clinton over the years speak of her in incredibly glowing terms. For her to gain a solid lead over Trump, the American people are going to have to hear some of those stories and come to see the Hillary Clinton that her colleagues talk about. A unified party isn’t the answer to that problem, but it is a precondition for answering it. Until yesterday, Clinton didn’t have it. Today she does.