WESTFORD (CBS) — Several train cars carrying a potentially flammable material derailed Tuesday night, prompting a Hazmat response and putting residents on alert.

Six cars from a Pan Am Railways freight train carrying Ferrous Chloride, a corrosive cleaning solution that is combustible when heated, went off the tracks in the area of Broadway and River Street in Westford.

Crews worked on scene Wednesday morning to turn the cars back upright and put them back on the track, using a large crane as fire officials stood by.

The derailment happened around 8:30 p.m. Tuesday.

“It was just sort of a crunchy boom sound, that was all over at once,” said one person who heard the crash.

Neighbors received an automated phone call notifying them of the derailment and were ready to evacuate, but it was determined there were no leaks coming from the derailed cars, and they were able to stay in their homes.

“I was getting a little concerned, because you don’t know what’s in the train, and all the chemicals,” said area resident Lisa Morton.

Hazmat teams responded to see if any of the corrosive material had leaked out, but Westford Fire Department Lt. Donald Parsons said there was no environmental impact whatsoever.

A freight train derailed in Westford Tuesday night. (WBZ-TV)

A freight train derailed in Westford Tuesday night. (WBZ-TV)

“There was no release to the environment,” he said. “The tank is intact, which is extremely important.”

Westford Selectman Donald Siriani said it was the second derailment in two years, and neighbors are concerned.

“It’s probably the most densely populated section of town,” Siriani said. “It’s disconcerting in the middle of the night to get a phone call, though apropriate for us to send them out, a reverse-emergency 911 that says we may need you to move out, to move to shelter.”

“Pan Am has to respond and let my neighbors, my constituents know why this happened, and what they’re going to do to make sure this never happens again,” he added.

A photo of one of the derailed train cars in Westford. (Photo Courtesy Jake and Heidi Targ)

A photo of one of the derailed train cars in Westford. (Photo Courtesy Jake and Heidi Targ)

Cynthia Scarano, Pan Am Railways’ executive Vice President, told WBZ-TV’s Anna Meiler that the company will investigate the track structure, the operation of the train, and the train’s black box to find out what caused the derailment.

“Safety is our number one concern,” said Scarano.

She said the train was travelling at a speed of 10 miles per hour when it derailed.

Lt. Parsons said the one car carrying the hazardous material was safe, and that the train tracks would have to be repaired.

WBZ NewsRadio 1030’s Ben Parker reports