An electrical cable on the fritz was to blame for the fire that caused delays on the Red Line and commuter rail Sunday morning, officials said.

Flames erupted on the inbound track leading to a maintenance facility near Andrew station and Dorchester Avenue just before 9 a.m. Sunday, Lt. Mike Walsh of the Boston Fire Department told Metro.

RELATED: MBTA’s pay-box system is no more

“The cables are coated in plastic and insulation, and the electricity gives off heat,” Walsh said. “There was probably a service issue there and as a result, the insulation from the coating of the wire caught fire.”

It took fire crews 15 minutes to extinguish the flames, Walsh said. He said he did not believe there was permanent damage to the track.

But the incident caused headaches for riders on the Red Line and commuter rail as crews responded to the scene of the fire.

RELATED:   Vandal tagged swastika at Dedham commuter rail station

The T tweeted reports of moderate delays on the Red line at 9:34 a.m., upgraded to “severe” at 9:44. Regular service resumed at 10:45 a.m.

Greenbush trains on the commuter rail saw delays of 90 and 30 minutes, a Kinsgston/Plymouth train was delayed 15-25 minutes and one train from Middleborough/Lakeville was terminated altogether, the service tweeted.