While the city sleeps, overnight crews at the TTC’s Wilson Yard work to secure a smooth morning commute for tens of thousands of Torontonians.

It’s 5:20 a.m. and the headlights of 49 subway trains pierce through the fog as they are directed from track to track at the rain-soaked sprawling 60-acre TTC complex on Friday.

The early-morning subway shuffle that takes place over a two-hour period is critical to ensuring the TTC is able to run efficiently.

“If you get the pullout right, you have a really good chance to have your rush hour right,” TTC Chief Operating Officer Jim Ross tells CTV News.

It is during this early morning window that the TTC must move dozens of subway trains out of maintenance garages and off storage tracks and onto Line 1, if the morning commute is to be successful. The subway moves 28,000 people between Eglinton and Bloor Stations between 8 a.m. and 9 a.m. every weekday and requires 26 trains to run an hour in order to service the line without massive overcrowding or delays.

But first the vehicles must be properly spaced out along the subway line, prepared for a shotgun start at 6am.

“Getting this yard right is critical to our morning rush,” says Ross.

Some of the worst commutes in the TTC’s recent history have been rooted in problems at Wilson Yard. On Jan. 30, 2018, trains were delayed nearly an hour getting out of the yard due to a signal failure and the effects cascaded throughout the system. Subway stations overflowed with commuters waiting for trains that did not come. The delay lasted hours.

Over the last year, automatic train control has been installed at the Wilson Yard, reducing the number of signal failures and improving reliability.

The challenge of moving the trains onto the line is that the puzzle is different every day. Different subways require different safety checks and maintenance work, and yard controllers must direct the trains to two handover points where subway operators are waiting to board and begin their routes.

The crews must manage bottlenecks while efficiently emptying the yard; any errors or failures at Wilson Station can be devastate the commute for big swaths of the city. The process is timed to a tee.

“Like a Swiss watch,” says Ross.