It was nearly four years ago that New York City Mayor Bill de Blasio went on NY1’s Inside City Hall to slam Gov. Andrew Cuomo.

The governor, de Blasio charged, worked too closely with Republicans in the state Senate at the expense of what was good for New York City.

The episode launched a years-long feud between the two men, with each subtle slight between them and their staffs scrutinized and de Blasio occasionally stymied in Albany.

Things change.

Now, with Democrats in the state Senate in a state of open warfare with Cuomo, the governor has found a friend in the progressive mayor, who has publicly backed him on the ill-fated Amazon project and, just today, a congestion pricing plan that would also restructure the MTA.

There is still daylight between the two on issues like NYCHA.

Cuomo playing nice with de Blasio also dovetails with a recent alliance with Comptroller Tom DiNapoli. Cuomo has backed efforts to return power to the comptroller’s office to review state contracting. DiNapoli backed a plan Cuomo embraced the boost state lawmaker pay, but also capped their outside income and stripped away most stipends for leadership posts.

The Senate, however, has been less a fun experience for the governor amid the fallout over the Amazon deal following the appointed of Sen. Mike Gianaris, a critic of the proposal, to the Public Authorities Control Board, which has oversight of economic development spending.

Cuomo has blamed Democrats in the chamber; Senate Democrats have pointed back at the governor.

“The State Senate deferred the State approval to that one Senator,” Cuomo said on WNYC, referring to Sen. Mike Gianaris. “And that one Senator said I am totally against it. And Amazon then said we don’t see how this winds up happening because we have to go to the State board called the PACB. The Senate put the local politician on that board who said over my dead body. And Amazon said I don’t see a way around this.”

Senate Democrats see it differently — namely that Amazon faltered because the project was negotiated in secret and the governor did want to countenance checks and balances.

“Once again the Governor refuses to take any responsibility for this failure,” said Senate Democratic spokesman Mike Murphy. “He still refuses to understand that the Legislature is a separate entity and has the right to ask questions. We made it clear that if he didn’t want to accept our suggestion we would make a new recommendation but we will never forgo our constitutional role and promise a rubber stamp to anyone. This is a Democracy not a Dictatorship.”