The mayor of Portland has declared an emergency as city officials respond to a fire-damaged building that may collapse and impact operations at a nearby rail line.

A fire broke out in the Centennial Mills building earlier this month, leaving the building charred and exposing dangerous materials inside. Fire crews reportedly tested the debris from the building and found it contained asbestos and lead, according to KOIN.

The building is set to be demolished on Friday, but officials are concerned it may collapse due to the fire damage before it can be safely dismantled. City officials said the building is being constantly monitored.

Compounding the safety concerns is the building's proximity to an active rail line operated by Union Pacific.

The transportation company said it will continue to operate near the building to prevent supply chain disruptions. On Monday, a spokesperson told KATU that shuttering that section of the railroad would impact "regional industries, small businesses, ports and consumer goods."

The company said that trains will only move at 10 mph or less while passing by the building and only operate on the rail farthest from the building to protect the trains in the event of a collapse.

City officials warned that the vibrations caused by the passing rail cars could further erode the building's stability and trigger a collapse.

Portland City Administrator Raymond Lee said he has warned Union Pacific of the potential risks.

“I know this is constraining to their operations, but our first responsibility is community safety,” Lee said.

He noted that the "city has very limited authority to really stop the trains.”

Union Pacific issued a statement this week responding to concerns over its continued operation near the building.

"Union Pacific transports a broad array of commodities and products important to Oregon consumers, regional industries and businesses, with more than 400,000 rail cars either originating or arriving in the state," the statement said. "We are a critical link in the supply chain, and an important mode of transportation for businesses in Oregon to access both domestic and international markets."

The statement added that a "closure of a critical rail line such as the one in Portland for more than week – with no end in sight - has real-world impact on these businesses and a ripple effect that impacts the broader supply chain."

"One more thing: it’s fair to say there are few things that you can find on store shelves or in your own home that weren’t – at one time – transported by rail," the company said.

Members of the public have been advised to avoid the area until the building has been dismantled.

The building was used as a flour mill and was in operation between 1910 and 2000.

The Independent has requested comment from the city.