A freight train that plunged into the Yellowstone River in Montana when a bridge collapsed early Saturday apparently spilled hot asphalt and molten sulfur into the rushing water.

Three rail cars hauling hot asphalt and four carrying molten sulfur fell into the swollen river around 6 a.m. near the town of Columbus, Stillwater County Disaster and Emergency Services said. 

Photos from the scene appear to show a yellow substance coming out of some of the tank cars.

Both substances solidify rapidly when exposed to cooler temperatures, Montana Rail Link said in a statement. 

1 DEAD, 1 WOUNDED IN LAKE MICHIGAN PLANE CRASH

collpased bridge and submerged train cars

Officials were investigating what caused the bridge to collapse and were assessing any environmental impact. (Stillwater County Disaster and Emergency Services )

David Stamey, the county's chief of emergency services, said there was no immediate danger for the crews working at the site, and the river was diluting the hazardous material. 

train cars in Yellowstone River

Several train cars are immersed in the Yellowstone River after a bridge collapse near Columbus, Mont., on Saturday. (AP Photo/Matthew Brown)

Officials took precautions following the hazardous spill, shutting down drinking water intakes downstream and the flow of river water into an irrigation ditch to prevent the contents of the derailed cars from reaching nearby farmland.

Two other rail cars carrying sodium hydrogen sulfate did not enter the water and initial air quality tests confirmed no materials inside these cars were released, the rail company said.

train cars in Yellowstone River

A yellow substance was seen coming out of one of the tank cars partially submerged in the Yellowstone River. (AP Photo/Matthew Brown)

Federal Railroad Administration officials were working with local authorities at the scene in a sparsely populated section of the Yellowstone River Valley.

US PEDESTRIAN DEATHS IN 2022 HIGHEST NUMBER IN MORE THAN 40 YEARS: REPORT

The area where the accident occurred is surrounded by ranch and farmland. The river there flows away from Yellowstone National Park, which is about 110 miles southwest.

It was unclear what caused the bridge to collapse. Investigators were looking into the bridge’s structural integrity and a record of its maintenance, repair and inspections.

Officials were also assessing the impact to natural resources and developing "appropriate cleanup, removal and restoration efforts," the rail company said.

CLICK TO GET THE FOX NEWS APP

The U.S. Environmental Protection Agency notes that sulfur is a common element used as a fertilizer as well as an insecticide, fungicide and rodenticide.

The Associated Press contributed to this report.