Spencer Platt/Getty Images

Andrew Cuomo beat Cynthia Nixon in a landslide.

Heading into Tuesday’s primary, Cuomo, who has served as New York’s governor since 2011, seemed vulnerable. New York City’s crumbling subway system left riders furious with the governor, who oversees it. There was growing anger from a resurgent left, who believed that the governor did not do enough to push progressive policies in New York or counteract the Trump administration. A bizarre legislative arrangement—in which eight Democrats caucused with Republicans in the State Senate, allegedly with the governor’s approval—became a rallying cry, even after the renegade faction returned to the fold earlier this year.

There was hope heading into Tuesday for Cuomo’s opponent, the actress and activist Cynthia Nixon. After a bitter, weird, and sometimes nasty campaign, the governor had one of the worst pre-election weekends in recent memory—a publicity stunt gone awry and an offensive mailer sent with the approval of top aides suggested a campaign in disarray. But ultimately none of it mattered. Cuomo easily defeated Nixon, with the Associated Press, Roll Call, and The New York Times all calling the race less than an hour after polls closed. While some pre-election polls had Cuomo leading by as much as forty points, his final election margin will be closer to thirty.

Cuomo spared no expense in the primary, spending millions of dollars from his sizable war chest to ensure a third-term—and to keep his 2020 presidential ambitions alive. Cuomo’s record of legislative accomplishments, which contains some major achievements on gay marriage and gun control, likely a role, although much of his campaign messaging focused on his role in the resistance to the Trump administration. He was aided by enormously high-turnout, which suggested an engaged Democratic Party infrastructure that delivered votes for him and his chosen attorney general, Tish James, who is leading in the polls. (Nixon’s running mate, Jumaane Williams, is in a tight race with Cuomo’s preferred Lieutenant Governor Kathy Hochul.) And he certainly benefited from the support of national Democratic figures, including Hillary Clinton and Joe Biden.

But he also won by running a vicious campaign against Nixon. For Cuomo and his allies, it was surely worth it, given the margin of victory, the all-but-guaranteed third-term, and, most importantly, the prospect of a 2020 presidential run. But while he may believe that a decisive primary victory and a third-term give him a unique claim to the Democratic nomination, the ugliness of this primary will linger.