Warring factions of the Working Families Party Friday night moved toward backing Gov. Cuomo’s re-election bid after threatening to dump him for another candidate, sources said.

As part of the tentative deal, Cuomo will push for a Democratic takeover of the Senate and pledge to pass progressive measures backed by the WFP, including campaign-finance reform, sources said.

“Will the governor support a Democratic Senate? Yes. He’s a Democrat,” said an insider involved in the discussions.

The Senate is now run by Republicans in a coalition with a handful of renegade Democrats who broke away from their party.

The deal would pressure the Independent Democratic Conference chairman and the other renegades to rejoin the regular Democratic caucus.

The Working Families Party will hold its convention in ­Albany Saturday night to nominate its statewide slate.

Union leaders who helped bankroll the leftist third party are behind Cuomo.

Stuart Appelbaum, head of the Retail, Wholesale and Department Store union and a WFP board member, said, “We are ­going to support Cuomo. Most unions support him.”

But the grassroots Occupy Wall Street types in the party complained that Cuomo was too moderate and pushed the candidacy of little-known liberal ­activist Zephyr Teachout, a Fordham University law professor, to be the standard-bearer.

Cuomo touted his progressive credentials to woo the WFP, including winning approval of the the gay-marriage law and stricter gun control. The WFP backed him in 2010.

Critics complained that he pushed for tax cuts for the wealthy and privatizing education via charter-school expansion.

“We were about to destroy the party,” a labor source said of the contentious infighting.

Sources cautioned that the fragile alliance could still blow up and lead to a free-for-all at the convention tonight.

Cuomo may not be able to deliver on the entire WFP agenda. Under pressure from the Conservative Party, Republicans are resisting a campaign-finance overhaul that includes using taxpayer funds to finance political campaigns.

Earlier Friday, one of the WFP founders trashed its leaders as “nothing more than a bunch of Park Slope limousine liberals” out of touch with common folks.

“To call yourself the ‘Working Families Party’ and then draw the line in the sand over campaign-finance reform is an absolute disgrace . . . When you can’t pay the rent or put food on the table, campaign-finance reform is a rich person’s problem,” said Mike McGuire of the Mason Tenders Council.