Democratic presidential nominee Hillary Clinton reacts as balloons and confetti fall on the final night of the Democratic National Convention in Philadelphia in July. (Carolyn Kaster/AP)

Last week, as the Democrats nominated Hillary Clinton for president, she and her political allies worked to present a united front against their opponent, Donald Trump. President Obama, Vice President Biden and first lady Michelle Obama all gave unequivocal endorsements of Clinton. The nominee herself appealed to both progressive and moderate Democrats, praising Obama and her defeated primary challenger, Sen. Bernie Sanders of Vermont.

And yet there was opposition to Clinton. Some Sanders delegates interrupted speeches with chants and booing. Sanders himself was booed by his own delegates when he mentioned Clinton’s name.

As we noted in discussing Trump’s Republican National Convention, these conventions over time have become focused more on celebrating and promoting presidential nominees, rather than on settling intraparty conflict. Does hostility between a recalcitrant segment of Sanders supporters and the official Democratic Party nominee suggest that the Democrats are in trouble?

Maybe not. Looking at the history of presidential elections and intraparty politics since 1952, it is surprising the Democrats are not more divided this year than they appear to be.

In the first half of the 20th century, parties commonly dominated presidential elections over a longer period of time than has been true during the past several decades. Between 1896 and 1928, Republicans won seven out of nine presidential elections and also had majorities in the House and Senate for most of that period. After the realignment election of 1932, when Democrat Franklin D. Roosevelt defeated President Herbert Hoover, Democrats took over as the dominant party. Between 1932 and 1948, Democrats won all presidential elections and only had two years in which they did not have unified control of the federal government.

But such “permanent” majorities began to disappear after Democrat Harry Truman’s presidency. From 1952 onward, the White House has generally been quite competitive: Of the 16 elections between 1952 and 2012, Republicans won nine and Democrats seven. The parties now switch control of the White House regularly. With the exception of the combined three terms served by Presidents Ronald Reagan and George H.W. Bush, neither party has won more than two terms in a row during this period.

Why do parties have such a hard time holding the White House? There are several reasons.

Since the advent of television, the United States has seen ever more rapid communications — accompanied by heightened expectations for presidential action, partisan polarization and high-stakes battles over domestic and foreign policy. In such an atmosphere, presidents make difficult policy decisions that are all too likely to backfire. For example, President George W. Bush’s approval ratings plummeted in his second term when voters were dissatisfied with his handling of the Iraq War, the response to Hurricane Katrina and the 2008 economic crisis.

Further, presidents often fall into personal scandals. For example, President Richard Nixon’s involvement in the Watergate break-in and subsequent resignation poisoned the Republican Party for the 1974 midterms and 1976 presidential election. President Bill Clinton’s extramarital affair in the late 1990s made his vice president, Al Gore, reluctant during the 2000 campaign to embrace Clinton’s policy achievements and economic success.

One or the other — policy failure or personal misbehavior — has thus repeatedly tainted the party’s brand and hurt presidential candidates campaigning for their party’s third term.

To escape this taint, new nominees usually try to distinguish themselves from the party’s incumbent president, as Gore did from Clinton. Similarly, in 2008, Sen. John McCain (R-Ariz.) tried to distance himself from George W. Bush. That summer, instead of attending the Republican National Convention, Bush decided to visit Hurricane Gustav evacuees in Texas. McCain and GOP leaders were relieved.

In such situations, parties go into elections for their third presidential term highly divided.

But that’s not true for the Democratic Party this campaign season. The Obama administration can point to accomplishments, including modest but relatively consistent economic growth and breakthroughs on core Democratic Party issues, such as health care reform, LGBT rights and equal pay for women and men. Perhaps because the public is dissatisfied with Trump and Hillary Clinton — Obama’s popularity increased, with the most recent approval ratings hovering around 50 percent, above average for modern presidents at this stage of their presidency. And Obama has stayed free of personal scandals.

Unlike her immediate predecessors, Clinton is therefore eager to claim Obama’s approval and to promise to extend his presidency.

President Dwight D. Eisenhower and President Ronald Reagan also had enough personal popularity that they could have helped elect a third consecutive Republican. But neither approved enough of the next nominee to extend his blessing.

In contrast, Obama is backing Clinton wholeheartedly. During his convention speech, he claimed that “there had never been a man or woman — not me, not Bill [Clinton], nobody — more qualified than Hillary Clinton to serve as president of the United States of America.”

Meanwhile, the convention may have ameliorated the Clinton-Sanders rift. That began when Sanders and his supporters reached agreement with Clinton on key issues, resulting in a progressive Democratic platform. Speaking at the convention, Sanders offered his strong support for Clinton. In return, Clinton and other party members, notably Obama, praised Sanders.

To be sure, the Democratic Party remains divided on crucial policy issues. But Clinton accomplished what Donald Trump failed to do: She unified the party leadership behind her.

It’s too soon to tell whether Clinton can hold together the coalition that elected Obama in 2008 and 2012 — young people, people of color, LGBT activists, college-educated voters, professionals and single women — and win the White House for a third consecutive Democratic term. But the Democratic convention signaled that she is a lot closer to achieving such unity than has been true for either party’s candidate in the last six decades.

Heersink is a PhD candidate in the Politics Department at the University of Virginia. Milkis is the White Burkett Miller professor in politics at U-Va. and faculty associate at the Miller Center.