The bus could be seen straddling the tracks, with a CSX Transportation locomotive pushed up against its left side.

The bus was apparently stopped on the tracks when the 52-car train, pulled by three locomotives, crashed into it, said Biloxi Police Chief John Miller.

“We’re not sure why,” Mr Miller said. “We don’t know if there were mechanical issues or what was taking place.”

Mr Miller said passengers on the Echo Transportation bus had come from Austin, Texas, heading to one of Biloxi’s eight casinos.

Ameet Patel, senior vice president of regional operations for Penn National Gaming, owner of Hollywood Gulf Coast Casino in Bay St Louis and Boomtown Biloxi Casino, said the bus was travelling from the Hollywood casino to the Boomtown Casino at the time of the crash.

“It’s a terrible tragedy,” Mr Miller said. “I know there’s a lot of families that are going to be impacted here.”

Four people died and around 35 were injured and taken to hospital. The names of the dead have not been released.

Witnesses told the Sun Herald of Biloxi that the bus was stuck on the tracks for about five minutes before the train hit it.

Mark Robinson said some people were getting off the bus as the driver tried to move it, and at least one person was shoved under the bus when the train hit.

A nearby car was used as a stepladder after the crash to get people off the bus, and emergency workers pulled passengers through windows.

Mr Robinson said he thinks the train track, which is on an embankment, poses safety issues.

“It’s too steep there,” he said.

Medical workers set up a triage area at the scene, and helicopters carried some of the passengers to other hospitals.

The train was headed from New Orleans to Mobile, Alabama, at the time of the crash, said CSX spokesman Gary Sease.

He said the train crew was not injured. The single track is the CSX mainline along the Gulf Coast, passing through densely populated areas of southern Mississippi.

The crossing has warning lights and gates. Federal Railroad Agency records show 10 trains a day typically use the track, with a maximum speed of 45 mph.

Records show there have been 16 accidents at the crossing since 1976, including in 1983 and 2003, each of which involved one fatality. A delivery truck was also struck at the same crossing in January, WLOX-TV reports. No one was injured in that crash.

The bus was marked as belonging to Echo Transportation, which Texas corporate records show is a unit of a company called TBL Group, based in Grand Prairie, near Dallas.

“We can’t confirm anything at this point,” said Elisa Fox, a lawyer for the bus company. “We’re trying to mobilise to assess the situation.”

Federal Railroad Administration spokesman Marc Willis said the agency is sending three inspectors to investigate, while Mississippi is sending one. The National Transportation Safety Board said it is also investigating.