It’s easy to see why Barbara Walters named billionaire Elon Musk one of 2014’s most fascinating people.

In the waning days of his 2014 re-election campaign, Gov. Andrew Cuomo turned to Musk to bail him out of a $1 billion economic development deal that was going down in flames — and could very well take Cuomo’s political ambitions with it.

Cuomo already had done Musk a favor, successfully working with the state legislature to grandfather in five service centers owned by Musk’s Tesla Motors when a bill was in the works to outlaw car sales that take place outside of traditional dealerships.

The legislative director for Cuomo’s dad, former Gov. Mario Cuomo, helped Tesla’s lobbying efforts.

Months later, Cuomo and Musk were together again, this time to announce that Musk would move another high-tech firm, SolarCity, into beleaguered Buffalo, N.Y.

That news did more than support Cuomo’s claim that he would make New York business-friendly. And It did more than make Cuomo look technologically savvy.

It rescued Cuomo from a high-profile disaster that began when he promised Buffalo voters — who had voted overwhelmingly for his opponent in the 2010 election — that he single-handedly could halt their city’s decline.

In the end, Cuomo won re-election this year, Musk’s SolarCity got a $750-million factory for $1 a year in rent. And New York residents? They’ll pay the bill.

“It just shows that Elon Musk knows how to operate politically to get major grants,” said Ed Cox, son-in-law of President Nixon and chairman of the New York Republican State Committee. “He is an absolute pro at getting political money.”

Once a thriving city, Buffalo is the second most populous in the state, but residents have been moving out, driven by a decades-long industrial slowdown. About a third of the area’s residents live below poverty.

“Four years ago, Cuomo lost big in Buffalo; he knew that was where he was vulnerable,” said Cox. Since the 2010 election, Cox said, Cuomo “has pampered Buffalo and showered it with projects.”