MANHATTAN — Tuesday evening, MTA officials issued a statement about the derailment that injured dozens of people and and snarled subway service.

The MTA said the cause was "an improperly secured piece of replacement rail that was stored on the tracks... and the cause appears to be human error, not a track defect."

Limited service has been running and the train has been removed from the tracks.

Track workers will be on the scene into the morning.

"I felt like I saw an explosion, or a fire or something, I didn't know," said rider Kelly Kopp said.

The power then went off and the train doors remained locked, prompting some passengers to panic and scream, according to Kopp.

“All doors, everything was locked. We had to kick the windows out of the subway doors. I mean, they’re shattered on the floor, the glass," Kopp said.

The train derailed at about 9:45 a.m. and riders were evacuated by 11:05 a.m., according to the MTA. At 5 p.m., the MTA said limited service had been restored on the A, B and D lines, but the C line remained suspended.

MTA Chairman Joe Lhota says the investigation will be done to determine what exactly happened in this specific incident. He said a top-to-bottom review of the MTA will address funding and long-term infrastructure issues.

Images on social media show firefighters on scene and smoky conditions.

"Huge bang, sparks and smoke. We were stuck underground for a while but it seems nobody was hurt," Gabriela Martinez said.

Passengers were also apparently evacuated from a B train, images on social media showed, but it was not immediately clear why.

Tuesday’s incident is the latest in what has turned out to be a tumultuous year for commuters.

“The MTA is in a state of crisis,” Gov. Andrew Cuomo said last week. “Historic underfunding leaves it with obsolete equipment going back to the 1940s. The bureaucracy is dysfunctional.”

In a statement released at the end of the day on Tuesday, Cuomo said, “while the investigation is ongoing, this morning’s subway derailment is an unacceptable manifestation of the system’s current state. New Yorkers deserve better. We are grateful to the first responders for their able assistance. It is my expectation that with new leadership brought by Joe Lhota, the MTA will address the fundamental issues plaguing the transit system and overhaul the organizational structure of the MTA. As I have told Joe, any support the MTA needs to get through this crisis, will be provided.”

Cuomo has introduced a bill to give himself majority control of the MTA board, saying that the state needs more overall control.