A large tree that had fallen onto the tracks caused a San Francisco Bay Area commuter train to derail Monday night, in an incident that sent nine passengers to the hospital — four of them with serious injuries.

The train, Altamont Corridor Express (ACE) No. 10, was traveling from San Jose to Stockton, Calif., when it went off the tracks Monday night. The derailment came after hours of sustained rains.

Member station KALW's Ben Trefney reports:

The front car tumbled into Alameda Creek, coming to rest half-submerged. None of the estimated 214 passengers died. Several agencies are investigating the derailment, which occurred after a day of heavy rainfall.

Rescue crews battled the creek's currents to pull passengers from the partially submerged rail car.

"It was dark, wet, it was raining. It was very chaotic," Sgt. Ray Kelly of the Alameda County Sheriff's Department said. "This is an absolute miracle that no one was killed, no passengers or first responders."

The rail cars were evacuated and commuters were examined by paramedics. Initially, 14 people received treatment at the scene; nine of them were then taken to the hospital. The rail company dispatched buses to take the passengers to their destinations.

In a statement, ACE says: "We are working with our partners to restore service as soon as possible pending a complete investigation and assurance that the tracks are safe."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.