A dangerous Manhattan subway escalator wreck could have been avoided — but the MTA failed to perform months of scheduled maintenance on the machine, according to a damning new report.

The top steps of the escalator at the Fifth Avenue/53rd Street station shredded to pieces last February — terrifying commuters during the morning rush hour — after its guiding tracks wore out, the MTA’s inspector general said in a report released Tuesday.

The problem at the E/M station should have been flagged during maintenance inspections — but MTA staff failed to complete all three checks planned over the six months leading up to the breakdown, the IG’s office says.

“You cannot have escalators wrecking with people on them — especially at rush hour in Midtown Manhattan,” said MTA Inspector General Carolyn Pokorny in a statement.

“While it is fortunate that no one was seriously injured, even during an era of resource constraints, New York City Transit must ensure that our stations’ key access points remain safe and operational.”

The escalator wreck came amid shoddy maintenance of escalators all across Midtown, according to the report. MTA staff failed to complete seven maintenance checks across six escalators in stations located between 14th Street and 72nd Street.

The superintendent responsible for the escalators in that area told investigators his team was understaffed, the IG says. The 10 mechanics responsible for maintenance checks “frequently were redirected to handle emergencies,” the report found.

On top of the understaffing, lackluster reporting on maintenance meant inspectors couldn’t easily track canceled or incomplete work, the IG found.

The MTA, which has abysmally few wheelchair-accessible subway stations, has historically failed to keep the 455 escalators and elevators it does have in service.

The average subway escalator is out of commission — either for planned or emergency work — for more than a month each year, according to MTA data.

In response to the Midtown escalator wreck, the MTA hired 15 new mechanics and 40 new “helpers” to assist across the system. Of the new hires, the Midtown zone received 12 helpers, four mechanics and two apprentices, according to the IG.

Transit officials agreed with the IG’s recommendations to create a new, cohesive reporting system by the end of the year so mechanics can more easily track what work has and hasn’t been completed.

“As the Inspector General herself noted about the year-old incident, the MTA has already taken significant steps to overhaul our escalator maintenance program, revamping the process when it comes to the frequency of maintenance work,” said MTA spokesman Andrei Berman in a statement.

But even after staffing up, the availability of subway elevators hasn’t improved and escalators have actually been offline more frequently since the February incident, MTA data show.

“We still see maintenance issues and reliability isn’t where it needs to be,” said Colin Wright, a senior advocacy associate at TransitCenter.

“Investing in elevator and escalator maintenance must be a top priority for the MTA — because it’s certainly a priority for the hundreds of thousands of riders with disabilities, elderly riders and riders with strollers.”