It was a chaotic scene with emergency rescuers breaking windows and jumping in the chilly water to rescue passengers.
PHOTOS:9 injured in Ace Train derailment in Sunol
Rescue crews said it was a miracle no one was killed.
There were more than 200 people on board the train. Nine people were injured and two of the victims remain hospitalized. All of the injured are expected to survive.
Service was shut down while investigators cleared the train from the track and debris on Tuesday. Although the train has been removed from the track, all trains going through Niles Canyon Road Wednesday will be moving slowly, so passengers can expect delays.
Shortly after 9:10 p.m., officials said Niles Canyon Road reopened to traffic.
Officials said removing the train was an elaborate process, involving a giant crane, several other rigs and dozens of people.
It almost looked like a toy laying on its side, but it was a 30-ton train car that needed to be lifted off a muddy embankment and back on the tracks. "It looks like something out of a movie, when you look at the scene and when I heard a train derailed in a canyon. I thought we were going to be hearing of massive loss of life," Congressman Eric Swalwell said.
RELATED: ACE train passengers recall terrifying derailment near Sunol
"People were out actually on the tracks at the time, some were in the cars," Calfire Capt. Judson Duffy
Duffy was among the first to arrive Monday night after the five-car ACE train derailed and one car plunged into the Alameda County creek. Rescuers said you could hear screams over the radio.
The first priority was getting to the passengers trapped inside the car that was nearly submerged in frigid water. "It was tight quarters in there because the car was on its side and then you can't really tell form here, but there's kind of two levels. Very slippery in there, a lot of mud and debris inside," Duffy said.
"There's no class in the police academy for underwater train derailment, so these deputies had to improvise and that takes courage and being quick on your feet and they did that," Alameda County Sheriff's Office Sgt. Ray Kelly said.
Officials say the train derailed because of a mudslide that sent a tree across the tracks.
They are starting to pick up and move the car in Alameda Creek. The plan is to make it parallel to track first. pic.twitter.com/vFlTFOdNF2— Laura Anthony (@LauraAnthony7) March 8, 2016
Congressman Eric Swalwell at scene of train derail. "It's like something out of a movie..." Thankful no one killed. pic.twitter.com/P9hsR7fTp2— Laura Anthony (@LauraAnthony7) March 8, 2016
Union Pacific hope to have the derailed train cars cleared by 4pm. Possible Ace train service tomorrow... pic.twitter.com/dRgmRdzwCz— Amy Hollyfield (@amyhollyfield) March 8, 2016
Look at all the workers having a meeting at the sight of last night's train derailment. pic.twitter.com/xCay8NA5NB— Amy Hollyfield (@amyhollyfield) March 8, 2016
TSA now on scene of train derailment wreckage. pic.twitter.com/64oYjGiv7T— Amy Hollyfield (@amyhollyfield) March 8, 2016
Our best look at the derailed train as the sun comes up. People saying it looks like a movie set- unbelievable. pic.twitter.com/5XEdEv2x0U— Amy Hollyfield (@amyhollyfield) March 8, 2016
Union Pacific employees are right now looking over the derailed train, figuring out how to move it out of here. pic.twitter.com/jHBrqjPkXQ— Amy Hollyfield (@amyhollyfield) March 8, 2016
Officials now saying a mudslide sent a tree into the racks that caused this Ace Train to derail last night. 9 hurt. pic.twitter.com/74XkDdIwA1— Amy Hollyfield (@amyhollyfield) March 8, 2016
ACE employee puts up this sign to let riders know there's no train service today pic.twitter.com/IqQ340I8zP— Janet O (@JanetONews) March 8, 2016
ABC7 News Reporter Janet O contributed to this story.