Gov. Cuomo and Mayor de Blasio used threats and intimidation in recent days to block prominent Democrats from backing leftist law professors Zephyr Teachout and her running mate, Tim Wu, in Tuesday’s primary, party insiders have told The Post.

The largely successful pressure has been especially intense to stop endorsements for Wu, who is given a real chance of defeating conservative-turned-“progressive” former upstate Rep. Kathy Hochul, Cuomo’s running mate for lieutenant governor, insiders said.

“Cuomo and de Blasio were pulling out all stops, making it clear that anyone who even considers endorsing Teachout or Wu will pay a big political price,” said a prominent Democratic activist.

“Cuomo especially is obsessed with Wu because he clearly thinks Wu has a chance to win, which would be a disaster for him,” the activist continued.

City Council members were told that pet projects would be endangered if they back either Teachout or Wu, said a source close to the council. “You wouldn’t believe how much we were intimidated and muscled,’’ said one.

Council members and state legislators were also warned that state-funded projects would be at risk if they publicly backed Teachout or Wu, several sources said.

Delivering some of the messages was Joe Percoco, Cuomo’s longtime aide and political enforcer, the sources said.

“It’s almost a running joke in Democratic circles with people who speak up for Teachout saying, ‘I’m about to get a call from Joe,’ ’’ said a Teachout-campaign insider.

Cuomo himself was also described as directly involved.

“A few days ago, Teachout received a call from someone she had hoped would endorse her saying, ‘I’m so sorry. I just got a call from the governor, and he mentioned a particular project that I’m interested in, and so I’m going to have to endorse him,’ ’’ the campaign insider said.

Teachout told The Post, “When you speak to elected officials, they’re pretty blunt about wanting to protect their constituents from reprisals if they were to endorse me.”

“I absolutely would have had the support of dozens of elected officials who have endorsed Cuomo if it wasn’t for that.”