The MTA has failed to inspect, maintain and test its rotting subway signal system — a main cause of train delays — in a timely fashion, perpetuating issues on the beleaguered system, according to a new audit.

The audit, released Wednesday by New York State Comptroller Thomas DiNapoli, found between Jan. 1, 2015, and Oct. 31, 2017, signal devices sampled at four sections of the subway tracks were not properly maintained.

Out of the 51,603 annual inspections with complete information performed from Jan. 1, 2016, to May 16, 2016, the auditors found that 39,194, or 76 percent, of them were done late.

In addition, 2,345 of the devices were not inspected by a supervisor during that time period, according to the report.

At the inspected locations, the auditors found that workers did not always perform maintenance, inspection and testing of its signal equipment within the required time intervals.

For example, at the locations of Howard Beach in Queens and Pelham Bay in the Bronx, 35 percent of signal maintenance required from Jan. 1, 2015, to May 16, 2017, were not done within the correct time period.

“When asked why MIT [maintenance, inspection and testing] was not always performed…the Maintenance Supervisors for Pelham and Howard Beach told us that they lack resources, and that stringent flagging rules dictate what work can be performed daily,” the audit reads.

Recommendations made by the comptroller’s office to the MTA, include a review and allocation of “resources to ensure that all signal devices are maintained and tested in accordance with applicable procedures and standards.”

DiNapoli said in a statement: “Faced with staff shortages, MTA put off inspections of one of the most critical components of the subway system. Transit acknowledges that malfunctioning switches and signals are one of the main causes of train delays and badly in need of repair, but it gave short shrift to preventative checks that could save riders aggravation and inconvenience.”

“The MTA needs to do better. Riders are voting with their feet and leaving the subways for other transportation,” the comptroller said.

MTA spokesman Shams Tarek responded to the audit in a statement, saying: “This audit reports on prior processes that have long since changed and predates major improvements in signal maintenance, and also ignores a significant path forward for millions of transit riders: The Subway Action Plan.”

The $836 million plan, which was announced in July 2017 and not fully funded until this summer, “has dramatically increased signal maintenance and repair, stabilizing and beginning to turn the tide in reliability, and [New York City Transit Authority President Andy Byford’s] Fast Forward Plan, if funded, will bring about the complete overhaul of the entire signal system,” Tarek said.

Under the Subway Action Plan, 123 positions have been added to the Signal Division, including 91 for maintenance and repair and the rest for emergency response teams. In addition, more than 11,000 signaling locations have been inspected over 660 track miles, according to the MTA.