A freight train slammed into a charter bus at a railroad crossing in Biloxi, Mississippi, on Tuesday, killing four people on the bus and leaving dozens of others injured, officials said.

Officials said the tour bus, which originated in Austin, Texas, and was heading to a casino, was stopped on the tracks for an unknown reason. Witnesses told local television station WLOX it got stuck there.

Biloxi city spokesman Vincent Creel confirmed the crossing had signs warning of its low ground clearance, which means a large vehicle could potentially become lodged on the tracks.

But he could not say if that is what occurred, adding that the crash was under investigation.

Three people on the bus were killed in the collision and a fourth person died after being transported from the scene, Biloxi Police Chief John Miller told a news conference.

Thirty-five passengers on the bus, which was carrying more than 40 people, were transported to area hospitals and a few other passengers escaped unharmed, Miller said.

Authorities airlifted some of the most badly injured victims to area hospitals. Nine of them were in critical condition, Creel said by telephone.

The crash follows an effort by Biloxi Mayor Andrew "FoFo" Gilich to close some rail crossings, with the stated goal of improving road safety in the city with a population of 45,000 people on the Gulf of Mexico.

But this crossing at Main Street, which was the site of another wreck between a train and a delivery truck on Jan. 5 with no injuries, was not one of those selected for possible closure, Creel said.

The freight train was operated by CSX, which said in a statement its crew members on board were uninjured. The crossing has flashing lights and gates, it added.

Sue Perkins, who was in a vehicle behind the bus and witnessed the crash, told WLOX the motorcoach appeared to get stuck because it was too long for the steep angle of the hill at the crossing.

The red lights at the crossing lit up and the safety gates descended with the bus stuck on the tracks, Perkins told the station. Then she saw the train in the distance and the conductor slammed on the horn but could not stop in time, she added.

"There was a big waterfall of glass that just came out of the bus" in the accident, she told WLOX.

The National Transportation Safety Board said in a message on Twitter it was gathering information about the deadly wreck.

WLOX, in broadcast footage of the accident aftermath, showed the bus standing upright, diagonally across the tracks with the train stopped at its side.

The bus, which has been removed from the tracks, was marked as operated by ECHO Transportation, Creel said.

An official with Texas-based ECHO Transportation declined to immediately comment on the crash.