When the presidential candidate debates began way back in August, few predicted it would be the Democrats who would fight until the final primaries.

With the last state contests set for Tuesday, front-runner Hillary Clinton and Sen. Bernie Sanders of Vermont still are battling for delegates, though Clinton’s victory appears all but a formality.

Six states, led by California and New Jersey, will hold Democratic primaries Tuesday. It’s the homestretch of what has been a longer-than-anticipated slog.

And if the results mirror the polls, Clinton has a shot at clinching the nomination in New Jersey — before voting even closes later that night in California.

If Clinton takes half of the 142 delegates at stake in New Jersey — and polls show her with a double-digit lead over Sanders — she should would reach the 2,383-delegate total necessary to secure the nomination. Part of her total is built on superdelegates (party and elected officials) who overwhelmingly favor the former New York senator. Sanders has vowed to try to get some to switch to his side, but that is a long shot.

Sanders and Clinton are running almost even in California, where 546 delegates are at stake. So if she doesn’t win it by New Jersey, even getting a small number of California delegates is almost a cinch.

advertisement | advertise on newsday

“Realistically, it’s over,” said Marist College pollster Lee Miringoff. “There is no real pathway for Sanders. And, really, there hasn’t been for some time.”

Miringoff said if Democrats held “winner take all” primaries as the Republicans do for some states, Sanders could win a narrow victory and make an impact. But Democrats award delegates roughly in proportion to the vote totals, meaning Clinton is assured of getting more delegates than she needs.

“The likelihood is they will come in pretty even in California and that doesn’t change anything but the symbolism,” Miringoff said.

Montana, New Mexico, North Dakota and South Dakota also hold primaries Tuesday, rounding out the statewide slate. The District of Columbia will hold a Democratic primary on June 14.

On the Republican side, Donald Trump already has won enough delegates to win the nomination. Still, four states hold GOP primaries Tuesday: California, New Jersey, Montana and South Dakota.

For his part, Sanders isn’t ready to concede. He said that not only will he fight in California and the District of Columbia, but also he’ll continue to try to get superdelegates to leave Clinton.

“We have absolutely the financial resources that we need to run a very, very strong campaign here in California and in the other states and in D.C.,” Sanders said in San Diego.

“If we win California, and if we win South Dakota, and North Dakota and Montana and New Mexico and New Jersey, and the following week do well in Washington, D.C.,” he said, “I think we will be marching into the Democratic convention with an enormous amount of momentum.”

The Clinton camp, in contrast, is treating the contest as already over.

The Clinton campaign distributed talking points to supporters, according to media outlets, that said: “Even if Senator Sanders wins each of the remaining contests by 32 points, Hillary Clinton will still have earned the majority of pledged delegates and popular vote.”

advertisement | advertise on newsday

Meanwhile, Democrats in Washington reportedly are discussing how to ease Sanders out of the race while not alienating his supporters — who Clinton will need in the general election.

And Clinton clearly has pivoted her campaign away from Sanders and toward Trump.

The two exchanged verbal punches this past week, a likely sign of things to come. Trump has been campaigning in California not primarily to win Tuesday’s contest, but to try to make a run at winning the state this fall.