Gov. Andrew Cuomo put the kibosh on e-bike and e-scooter legalization on Thursday, vetoing a bill state reps passed overwhelmingly in June, his office said.

The legislation would have lifted state restrictions on the electric vehicles while allowing local jurisdictions to regulate or even ban them — but Cuomo took issue with the omission of a helmet requirement and other “safety measures.”

“Failure to include these basic measures renders this legislation fatally flawed,” Cuomo said in his veto explanation.

“Specifically with respect to e-bikes, the throttle motor that allows a rider to increase speed without pedaling renders e-bikes indistinguishable from mopeds, which are already regulated and require license plates and drivers licenses,” he said.

Bill sponsors told The Post they were willing to negotiate, but Cuomo gave the cold shoulder amid unrelated tensions with senate sponsor Jessica Ramos, of Queens.

The bill came with caveats: In order for e-bikes and e-scooters to become legal, the city would also have to reverse its own longstanding prohibition against them.

The legislation would have also banned e-bikes from the Hudson River Greenway and e-scooters from all of Manhattan.

E-bike and e-scooter riders currently face $500 fines and property confiscation simply for riding.

Some city council members and transportation advocates want NYPD to halt that enforcement, which they believe unfairly targets immigrant food delivery workers.

Cuomo’s veto “effectively condemns delivery workers to continued police harassment,” said Macartney Morris of the Biking Public Project, a worker advocacy group.