Gov. Andrew Cuomo’s radical shift to the political left over the past few years has been a “cynical and calculated” strategy to position himself to run for president in 2020 if, as he hopes, Hillary Clinton or another Democrat loses the November election, The Post has learned.

“It would be fair to say that Andrew sees his entire political future resting on the defeat of Hillary, Bernie Sanders or another Democratic nominee so that he emerges as the ‘progressive’ choice in four years,” said a highly informed source familiar with Cuomo’s thinking.

“Andrew has contempt for Albany. He’s restless and tired of what he sees as the ‘small-ball’ job of governor. He wants to get back to Washington, and he knows his only hope is a Republican president he can challenge in four years,” said the source, who has known Cuomo for more than 20 years, including during Cuomo’s time as President Bill Clinton’s housing secretary.

“If you examine things closely, the turning points were, first, the Occupy Wall Street movement, which scared him, then the re-election of [President] Obama, which he doubted, and finally, the strong showing by an unknown [Zephyr Teachout] running against him in the 2014 primary,” continued the source, who said he admired Cuomo’s “careful political calculations” but not “his cynical and calculated willingness to abandon any position for his own advancement.”

“Cuomo was jolted by those events and came to realize that he was out of step with the ‘progressives’ and had to move sharply to the left to keep up with his own party,’’ the source said.

The source predicted Cuomo won’t seek re-election in 2018 — despite his public pledge to do so — if a Democrat is elected president in November.

“A Democratic president will run for re-election in 2020 and that means Cuomo is out of it until 2024, which means he’d have had to be re-elected to a fourth term [as governor] and by then, everybody will be sick of him,” the source said.

Cuomo’s presidential strategy explains his seemingly contradictory actions, including his aggressive efforts to humiliate Mayor Bill de Blasio, a one-time ally and leading Democratic “progressive,” but a potential Cuomo rival in 2020 should he win re-election as mayor next year, according to the source.

It also explains, said the source, Cuomo’s embrace of Big Labor’s demand for a nearly 70 percent minimum wage hike to $15 an hour — which could devastate small businesses at a time the governor claims to want to improve New York’s notoriously hostile business climate.

The source said Cuomo’s frequent “embarrassing and over-the-top” praise of the Rev. Al Sharpton — who in the past insulted Cuomo’s father, Gov. Mario Cuomo, during the Tawana Brawley racial hoax — “makes sense in the context of the governor wanting to lock up black support in his run for president.”

Cuomo’s national strategy also explains other high-profile actions, including his belated embrace of a “women’s agenda,” his refusal to permit “fracking” for natural gas even after repeatedly promising to do so, his anti-gun Safe Act, his embrace of the teachers unions he had once sharply criticized, and his recent high-profile crackdown on Korean-owned nail salons in the city that, according to a deeply flawed report in the New York Times, were exploiting their immigrant workers, said the source.

“Big Labor, the teachers, blacks, women’s groups, gays, radical environmentalists, anti-gun activists, and you have a powerful ‘left’ coalition in a Democratic primary for president,” the source summed up.

“Add to that the elimination of a serious potential challenger — de Blasio — and you have Andrew starting to clear left field for 2020.

“Andrew knows better than anyone that without a Democratic loss in November, he has no political future, and if that’s the case, he’s going to be one miserable SOB.”