The MTA says a train derailment at Grand Central will be cleared before the morning rush hour.

It happened as the Metro-North train was pulling out of the station Wednesday evening.

The rear cars were still at the platform, so Metro-North officials say the roughly 800 passengers were able to walk off the train, but the derailment left nine tracks unusable, leading to some delays and big crowds in the terminal.

"We had to do some fancy footwork in terms of reassigning tracks and combining trains, so there were a lot of people standing in the concourse, looking up at the board, waiting for a track assignment," said Metro-North spokeswoman Marjorie Andrews. "So as you can see, we managed to get everybody home tonight with minor delays."

There's no word on what caused the derailment.

The train was on its way to Wassaic on the Harlem line.