Gov. Andrew Cuomo turned aside a progressive challenge from actress and education activist Cynthia Nixon on Thursday, clinching the Democratic nomination in his march toward a third term.

The primary campaign highlighted Cuomo’s use of smash mouth politics, his $31 million war chest that pumped cash into a steady stream of TV and digital ads and his ability to maintain a stitched-together coalition of Democratic voters in union households, western New York and among people of color.

Cuomo’s road to victory, however, was a bumpy one.

In August, he drew national headlines when, riffing on President Donald Trump’s “Make America Great Again” slogan, he said America was “never all that great.” He later said he misspoke.

Cuomo’s celebrated opening of the second span of a bridge named in honor of his father was delayed after a piece of the old Tappan Zee Bridge had become destabilized.

Cuomo insisted the closure was coincidental and that politics played no role in the bridge ceremony. A letter from the state Thruway Authority made public in the following days revealed the state sought to encourage the span’s readiness by mid-August.

Meanwhile, a mailer paid for by the state party accusing Nixon of anti-Semitism was roundly condemned by Democrats, both allies and opponents alike.

Like the bridge incident, Cuomo insisted he played no role in the mailer and has called it a mistake.

Cuomo had sought to run on his record of the last eight years as the Democratic governor who was able to accomplish major achievements, be it gun control, the legalization of same-sex marriage or the passage of a paid family leave program.

In those accomplishments, Nixon and her allies sought to highlight the weaknesses: The minimum wage is due to increase to $15, but it’s unclear when that happens for upstate New York. Hydrofracking has been banned, but natural gas pipelines continue. Cuomo’s climate change initiative fails to go far enough.

But Cuomo also has framed his re-election around Trump and his vow to have the state act as a liberal bulwark against the federal government’s policies on the environment, organized labor, health care and immigration.

At the same time, Cuomo spent heavily on advertising, expending at least $8.5 million from his campaign committee in the last month of the race. The Democratic committee

Nixon remains the endorsed candidate of the Working Families Party, the liberal organization that gambled with endorsing her in April. Unless Cuomo takes the WFP line, the group’s ballot status could be in doubt.

Republican Marc Molinaro, Green Party candidate Howie Hawkins, Libertarian Larry Sharpe and Stephanie Miner, a Democrat mounting an independent bid for governor, round out the November ballot.

For progressives, the defeat on Thursday could have some silver linings. They will claim that Cuomo moved to the left on a variety of key issues as a result of Nixon’s challenge including issues like the legalization of marijuana, though Cuomo had been shifting further to the left in his second term, perhaps in anticipation of a primary challenge.

The state Capitol, nevertheless, could prove to be a different place for a governor who has mastered legislative maneuvering and negotiations, especially if the state Senate falls under the control of his own party.