The Democratic leader of New York’s state Assembly is gearing up to protect the party’s long-tenured incumbents from a potential insurgency mounted by far-left upstarts.

Assembly Speaker Carl Heastie vowed at a recent fundraiser to flex his political muscle and campaign resources to help veteran Democratic state lawmakers — like fellow Bronxite Jeff Dinowitz and Brooklyn’s Joe Lentol — beat back primary challenges.

“There are some out there in the political world who think that if you were elected before 2016 you’re no good,” Heastie said during an Oct. 10 Democratic Assembly Campaign Committee fundraiser at the Sheraton Times Square, according to sources in attendance.

Dinowitz, who has held his 81st District seat since 1994, confirmed the content of Heastie’s rallying speech.

“It’s great to know the Speaker recognizes the work I’ve done,” said Dinowitz, who faces a primary challenge from activist George Diaz. “We’re part of a team. We look out for each other.”

Dinowitz said that Rep. Alexandria Ocasio-Cortez’s stunning 2018 primary upset of 10-term incumbent Joe Crowley has inspired others to challenge the status quo.

“She showed that an extreme underdog can come out of nowhere to get elected,” said Dinowitz, noting that not all incumbents rest on their laurels.

“There’s very little rationale for trying to oust the very people who’ve delivered record accomplishments over the past year,” he said.

Heastie did not respond to requests for comment.