Gov. Cuomo made a dramatic proposal in his State of the State speech Wednesday to offer bonuses of up to $20,000 for teachers who receive top marks on their evaluations.

Siding with education reformers, Cuomo suggested that teachers rated “highly effective” collect the merit pay from a new Teacher Excellence Fund that would be established by the state.

Local school districts would have to agree to the payouts.

So would the local teachers’ unions, which have historically rejected merit-based pay differentials for their members.

Just minutes after the 67-minute speech, Mayor de Blasio told reporters he opposes such performance-based bonuses, putting himself squarely on the side of the unions.

“I believe it’s appropriate for strategic reasons to give bonuses, for example, when we have teachers that work in some schools that are really struggling,” he explained after listening to the governor speak in Albany.

The mayor said it was also appropriate to pay more for math and science teachers who are hard to recruit.

But he came down firmly against Cuomo’s plan.

“I do not believe in, for example, merit pay,” de Blasio declared.

The mayor and governor are already at odds over how to pay for the expansion of pre-Kindergarten classes.

De Blasio wants to raise the city income tax on those earning $500,000 or more — at the same time that Cuomo is calling for $2 billion in state tax cuts.

The governor ducked the tough issue in his speech, saying merely that he supports universal pre-K — without saying how it should be funded.

With an eye on his re-election in November, Cuomo delivered a laundry list of initiatives certain to be endorsed by key voting blocs, from tax relief for homeowners and tenants to the legalization of medical marijuana.

Among the governor’s plethora of proposals:

* $2 billion in property-tax relief over three years for property owners, renters and businesses.

* One-year license suspension for drivers nabbed texting while driving, up from the current six-month penalty.

* A five-year license suspension for twice convicted DWI offenders and a lifetime ban of those convicted three times.

* Full tuition scholarships to the top 10 percent of high school graduates who pursue science, technology, engineering or math degrees at SUNY and CUNY.

* A $2 billion bond referendum, that, if approved, would provide tech upgrades to schools.

* Providing Metro-North riders access to Penn Station in the event of a shutdown at Grand Central.

* Have the state assume control of construction projects at La Guardia and Kennedy airports from the Port Authority.

* Exempting 16- and 17-year-olds charged with crimes from being treated as adult.

The governor also threw the down the gauntlet to the Legislature, urging lawmakers to pass ethics reform to end pay-to-play corruption scandals engulfing Albany.

“Government is limited by the lack of trust,” Cuomo declared. “We need the public trust. That’s what ethics reform is all about.”

De Blasio — who was treated as a rock star during his visit to Albany as mayor, with lawmakers tweeting photos of him — generally praised Cuomo’s speech as “progressive” and “pro-active.”

He even applauded Cuomo’s backing of universal pre-K.

“I heard him say this is the goal for the state . . . I’m suggesting that what we have done already is complimentary to the governor’s goal,” the mayor said.

In another move that some observers viewed as a knock at de Blasio, Cuomo announced that former city Police Commissioner Ray Kelly would become a special adviser to the new SUNY College on Emergency Response, Homeland Security and Cybersecurity.

During his campaign for mayor, de Blasio slammed Kelly over the NYPD’s stop-and-frisk policy.