President Joe Biden is the projected winner of New Hampshire's Democratic primary, even though he was not on the ballot.
A write-in effort helped him avoid the embarrassment of losing to Dean Phillips, a Democratic congressman.
Mr Biden had skipped the primary, as the party decided South Carolina should be first to vote.
But New Hampshire refused to move its vote, leading to a standoff with party grandees in Washington.
Mr Biden's expected margin of victory in the Granite State is not yet clear, though opinion polls at the weekend had suggested he enjoyed a formidable lead, despite the curious circumstances.
Some of Mr Biden's Democratic allies in New Hampshire had been urging voters to write his name on the ballot when they voted.
The duel between Donald Trump and Nikki Haley in the Republican primary generated most of the drama.
But some Democratic infighting - over scheduling of the election calendar - made headlines, too.
The Granite State has long been the first primary in the nation, but the Democratic National Committee decided to have South Carolina go first in 2024.
They said the southern state's diverse population was more reflective of the country.
But New Hampshire did not move its primary - it is bound by its state constitution to be first - which caused it to be stripped of the delegates that candidates need to win the Democratic nomination.
Mr Biden also chose to follow the party's decision and did not register as a result.
That left the US president facing a challenge from Mr Phillips, a Minnesota congressman.
Mr Phillips maintained that Mr Biden, 81, is a "weak candidate" who could very well lose against Mr Trump in November.
"I'm just afraid that Democrats are sleepwalking into disaster," Mr Phillips, 55, told the BBC. "We did it in 2016. It is unforgivable and shameful to do the same thing knowingly this year."
A moderate, Mr Phillips came to office in 2019. As the heir to his stepfather's Phillips Distilling Company empire, which owns major schnapps and liquor brands, he is one of the wealthiest members of Congress.
He tapped into that wealth in New Hampshire. Mr Phillips spent more than $5m on ads in the state, according to ad-tracking firm AdImpact. Mr Biden, meanwhile, only spent $156,000.
Mr Phillips was not the only Democratic challenger.
Marianne Williamson, 71, an author and motivational speaker, was another longshot contender in the New Hampshire primary.
There was also an effort by activists for Democrats to write "ceasefire" on their ballots instead of the president's name, because of Mr Biden's support for Israel. But it is not yet clear how many voters, if any, did this.