Hillary Clinton and Sen. Bernie Sanders appear on stage at the Democratic presidential debate in Brooklyn in April. (Melina Mara/The Washington Post)

Hillary Clinton's declaration of victory this week has officially set in motion the effort to mend the wounds of a sometimes bitter primary contest.

Party leaders hoping that Sen. Bernie Sanders's backers will support Clinton this fall have at least one reason for optimism: There are apparently fewer hard feelings among Bernie supporters this year than there were among Clinton backers when she lost the presidential nomination to Barack Obama in 2008.

A May Washington Post-ABC News poll found 20 percent of Sanders primary supporters said they would support Donald Trump if he faced Hillary Clinton in a general election. At the same point eight years ago, 26 percent of Clinton primary supporters said they would support Republican Sen. John McCain.

Looked at the other way, 64 percent of Clinton primary supporters said they would support Obama in the general election; this year, 71 percent of Sanders backers choose Clinton over Trump. The differences between years are not statistically significant, though they suggest intra-party discord is at least no higher this year.

And yes, it did take time, but those skeptical Clinton supporters did gradually come around to help elect Obama.

Post-ABC polling tracked Clinton's 2008 primary supporters throughout the fall campaign and found they steadily gravitated toward Obama during the general election. Obama's support among Clinton primary supporters rose from 64 percent in May to 73 percent in mid-September, 79 percent in mid-October and 83 percent by Election Day, according to the national network exit poll.

While roughly 1 in 6 Clinton supporters eventually defected to McCain in 2008, Obama still won support from 89 percent of all Democrats, tying John Kerry's mark in 2004 for the highest level of Democratic unity since exit polling began in 1972.

The 2008 election is just one data point, of course, and The Washington Post's Philip Rucker and Dan Balz report that leading Democrats are concerned Clinton could have more difficulty bringing Sanders into the fold than Obama had eight years ago:

For one, Sanders operates outside the Democratic Party structure. He has run in Vermont as an independent and self-described democratic socialist. And though he caucuses with Democrats in the Senate, his ties to the institutional party are decidedly looser than were Clinton’s.

Even more important, however, is that his candidacy — like Obama’s in 2008 — generated great enthusiasm and spawned a powerful grass-roots movement made up of independents and others who do not identify with the Democratic establishment. Clinton will need his voters in the fall, and that no doubt will require the help of Sanders.

One basic challenge for Clinton is her weak personal popularity among Sanders supporters; 47 percent of his voters have a favorable impression of Clinton, while 51 percent are unfavorable, according to the May Post-ABC poll. That's substantially worse than Obama's 68-25 favorable-unfavorable split among Clinton backers in June 2008 — though that was one week after Clinton endorsed Obama, the biggest gesture in mending ties between the two candidates' supporters.

If there's one saving grace for Clinton this time, it could be that Sanders supporters are far more negative toward Trump — 18 percent favorable versus 82 unfavorable — which could be decisive for many holdouts to support Clinton by the fall.

The 2008 campaign showed that party unification after a contentious primary is slow but very possible. And if Clinton can successfully bring them into the fold, Trump's math will become much more difficult.