A safety device meant to keep trains from tipping into Puget Sound knocked a train off the tracks last week, spilling 3,100 gallons of diesel fuel in Washington state, according to the Federal Railroad Administration.

The seven-car BNSF Railway train was approaching a swinging bridge over the Swinomish Channel on Thursday after leaving an oil refinery in Anacortes when it derailed.

Devices called "derailers" sit on both sides of the bridge, embedded in the railroad tracks, to force trains off the tracks when the bridge is open, KUOW reported.

The bridge was ready for the train to cross that morning, but at least one derailer was still in operation. The train’s wheels hit the steel-wedge device and two engine cars ran into the dirt next to an RV park and casino.

BADGERS BURROWING UNDER DUTCH TRAIN TRACKS LEADS TO DELAYS

Federal Railroad Administration spokesperson Warren Flatau told KUOW there was a miscommunication between the train crew and the bridge tender. He said it appeared neither the BNSF bridge tender nor the two-person BNSF train crew followed procedures.

BNSF Railway spokesperson Lena Kent declined to comment.

Washington Fox News graphic

A safety device knocked a train off the tracks last week. The train spilled 3,100 gallons of diesel fuel in Washington state.

"It does appear that there was a miscommunication between the crew and the bridge tender regarding the lining of the bridge and lowering of the derails," Herb Krohn with the International Association of Sheet Metal, Air, Rail and Transportation Workers said in an email. The union represents BNSF engineers and conductors.

The train’s engineer had "many years of experience," Krohn said.

AYER, MASSACHUSETTS TRAIN DERAILMENT: CSX SAYS NO INJURIES, NO HAZARDOUS MATERIALS INVOLVED

Human error and poor track conditions are the leading causes of rail accidents in the United States, according to Federal Railroad Administration data.

Given the spill’s location on a tribal reservation, the Federal Railroad Administration sent an official to the site to monitor cleanup but is not conducting a full investigation. With no injuries, fire, or explosion, the derailment didn't meet the agency’s threshold to conduct a full investigation, Flatau said.

CLICK HERE TO GET THE FOX NEWS APP 

Federal officials said Saturday that crews had removed more than 2,100 cubic yards of diesel-contaminated soils and pumped out 4,300 gallons of contaminated groundwater. BNSF will pay for the response costs, officials said.

At least 44 million tons of hazardous material moves by rail through Washington state every year, according to the U.S. Bureau of Transportation Statistics.