Rescuers battled the creek's fast-moving currents Monday night to pull riders to safety from the partially submerged rail car, Alameda County Sheriff's Sgt. Ray Kelly said.
"It was dark, wet, it was raining. It was very chaotic," Kelly said. "This is an absolute miracle that no one was killed, no passengers or first responders."
Four people were seriously hurt, while five others had minor injuries, the Alameda County Fire Department said. The department had been saying in the first hours after the crash that 14 people were injured.
The Altamont Corridor Express (ACE) No. 10 commuter train was traveling from San Jose to Stockton when the first two cars went off the tracks near Niles Canyon Road in Sunol, a rural area of Alameda County about 45 miles east of San Francisco.
Altamont Corridor Express train official Steve Walker said the first car was carrying six passengers and one crew member when it fell into Alameda Creek.
Walker told San Jose television station KNTV the second car behind it also derailed but remained upright.
He said three more cars behind, including the locomotive, stayed on the tracks.
Passengers described a harrowing scene of panic and confusion.
Rak Akhter said he was in the front car that fell into Alameda Creek and saw a woman lying in mud just under a train car hanging off the tracks.
"We were all just panicking," Akhter, who waited wrapped in a blanket for a ride home, told San Jose television station KNTV.
Passenger Russell Blackman told KGO-TV he was in the second car, which stopped near the creek.
"Our car went off the track and stopped right at the edge, which was a blessing," Blackman said. "I was thrown out of my seat. I hurt my shoulder, but I'm not going to complain."
Images posted on Twitter by Alameda County Fire Department showed that car on its side about half-submerged in the creek water.
Passengers were evacuated and checked by paramedics. The uninjured riders were transported to the Alameda County Fair in Pleasanton, the department said.
Altamont Corridor Express said it sent buses to take passengers to their destinations. The company also said it was cancelling all train service on the line Tuesday.
The ACE No. 10 train, which travels from Silicon Valley to Central California, stopping in eight cities along the way, was carrying 214 passengers, officials said.