The lone bright spot for liberal insurgents came down ballot, where Democratic challengers in State Senate contests had knocked off six of the eight members of a group of rogue Democrats who had broken with the party in recent years to form a coalition with Republicans in Albany.

Mr. Cuomo’s victory ensures that no Democratic governor or senator in America lost a party primary in 2018, a sign of how steep a climb Ms. Nixon, an actress and activist, had faced, even before the governor’s campaign unloaded a sum close to $25 million to blanket the contest in a blizzard of television ads and glossy mailers.

“When others were underestimating us, he did not,” Ms. Nixon said in her concession speech. “And he spent accordingly.”

In November, Mr. Cuomo, 60, will seek to match the three terms that his father, Mario M. Cuomo, achieved as governor. He has forcefully denied any presidential ambitions of his own, saying the only way he would not serve through 2022 would be death.

Mr. Cuomo himself had sought to mostly ignore Ms. Nixon in recent months, focusing repeatedly on President Trump. His campaign, meanwhile, methodically pushed to undermine Ms. Nixon’s credibility in often-caustic terms, tapping into the concerns of New York Democrats that an experienced governor is needed while a hostile Republican occupies the White House.

After a six-month slog versus Ms. Nixon, Mr. Cuomo now faces a less than 60-day sprint of a general election against the Republican, Marcus J. Molinaro, the affable Dutchess County executive who was once the youngest mayor in the nation. He, like Ms. Nixon, is expected to be drastically outspent by Mr. Cuomo. And in a heavily Democratic state in what most strategists predict will be a Democratic year, Mr. Molinaro’s bid is not seen as a top-tier race for Republicans nationally.