SAN BERNARDINO (CBSLA) – Tense moments unfolded for passengers on board a Metrolink train after it collided with a bus in San Bernardino Monday night.

The bus had broken down on a stretch of tracks near West Toranga Street and North Rancho Avenue due to engine problems. No one was on the bus at the time of the crash.

READ MORE: Federal Court Strikes Down Judge’s Order To Provide Housing To All Skid Row Homeless

There were about 40 riders on the train during the collision. Police said it doesn’t appear any of those people were seriously injured.

An OmniTrans spokesperson said they believe the crash was less severe than it could have been, in part, because of the quick thinking of the bus driver.

READ MORE: Smokey Southland Skies Caused By Wildfires Burning In Northern And Central California Spur Air Quality Concerns

As soon as the bus driver heard the crossing arms come down on the track, he went out of his way to let the train’s engineer know there was an obstacle ahead.

“He actually took off his safety vest and started walking down the track towards the oncoming train to flag — to try to let the engineer know there was a problem,” said OmniTrans spokesperson Wendy Williams. “We believe that the train was able to slowdown, somewhat, before impact.”

The bus was damaged on the side that was struck by the train, including broken windows. The train only had minor damage. Some people on the train complained of neck pain.

MORE NEWS: Father Memorializes Son, Who Died In 2019 Conception Boat Fire, Along Last 500 Miles Of 2,600 Mile Hike

KCAL9’s Nicole Comstock was told if the bus driver had not warned the train engineer, it would have been coming through the intersection at regular speed.