Former MTA transit chief Andy Byford says Gov. Andrew Cuomo undermined him to the point that his job became “intolerable” and even “yelled” at his staff behind his back, according to a new interview.

“I needed to be left to run the system,” Andy Byford told WCBS-TV’s Marcia Kramer in an interview set to air Friday evening. “It got to a point where it was obvious … I was not going to be allowed to get on with what needed to be done.”

Byford announced his resignation during an MTA board meeting on Jan. 23, and formally left on Feb. 21, a little over two years after Cuomo brought him to New York from Toronto.

Byford told Kramer he no longer expected to have autonomy over his team by the time he resigned. He said Cuomo and others frequently gave marching orders to his subordinates without his knowledge — and that angered him.

“I just would not accept the fact that my people were being yelled at,” he said. “They were being given direction, and I was deliberately excluded from those meetings.

“It got to a point where it was obvious … I was not going to be allowed to get on with what needed to be done,” he told Kramer. “I had to make to my mind up, as a person with very strong principles, can I accept … a situation where I’m in a safety-critical role and the people are being given direction on operational matters behind my back.”

He then added: “To me, it’s actually dangerous, also, that people who are not professionally qualified should give direction on operational matters.”

Asked about Byford’s comments at a coronavirus press conference in Albany, Cuomo claimed to have never told Byford what to do.

“I didn’t work with Andy Byford. I worked with Pat Foye … I worked with his higher-ups,” the governor said.

When asked if Byford was “undermined,” the governor said: “If anything, he was over-mined because I dealt with his bosses.”

Under Byford’s leadership, the city’s subway hit its highest on-time performance rate since 2013.

The British railway exec earned praise from MTA riders and works, who appreciated what Danny Pearlstein of Riders Alliance told The Post was “an utterly refreshing approach to public service that inspired tremendous confidence in the riding public.”

Reached by The Post, he declined to comment on the CBS interview.

“Andy Byford was a respected leader at New York City Transit. We wish him well in whatever he decides to do next,” MTA spokesman Tim Minton said in a statement.

Additional reporting by Bernadette Hogan