Santa Barbara County firefighters and Amtrak dispatchers were forced to reroute a passenger train Wednesday afternoon after an automobile accident left an overturned car sitting precariously close to the railroad tracks.

The vehicle was traveling south on Highway 101 near Refugio Beach when it veered off of the road and rolled over twice before coming to rest near a set of railway tracks that run adjacent to the highway. Santa Barbara County Fire Dept. spokesman Diondray Wiley said firefighters responded to the scene at approximately 1 p.m. to find the two passengers of the automobile, whose names had not been released as of Wednesday evening, standing near the vehicle.

“The two people were outside the car, which is pretty fortunate for them, I guess,” Wiley said. “I’m not sure of the extent of their injuries.”

Both passengers were transported to Goleta Valley Cottage Hospital for medical attention. The California Highway Patrol (CHP) is currently working with the passengers to determine the cause of the accident.

Wiley said the firefighters attempting to secure the scene decided to reroute the train in order to clear a safe space for themselves.

“The firefighters were working close to the area and, with the train speeding by, you could get sucked into it,” Wiley said.

Amtrak spokeswoman Sarah Swain said train 14 of the Coast Starlight Route between Los Angeles and Seattle was rerouted around the area of the accident.

“It caused a one-hour delay and the train continued on,” Swain said. “There have been no passenger complaints I have heard of.”

Swain said the train was given plenty of advance notice about the accident and had little difficulty detouring around the area.

“There’s dispatchers involved and they give instructions to the train and train conductors follow those directions.”