(Reuters) - Firefighters on Friday extinguished a string of sulfur fires that broke out in a small Pennsylvania town after dozens of CSX Corp rail cars careened off the tracks, the company said, but residents remained under evacuation orders.

A Pennsylvania State Trooper restricts access to an area where a CSX Corp freight train carrying flammable materials derailed as it moved through Hyndman, Pennsylvania, U.S., August 2, 2017. REUTERS/Maranie Staab

Emergency agencies were awaiting results of air quality tests in the area before determining as early as Saturday when residents of tiny Hyndman, Pennsylvania could be allowed to return home, CSX spokesman Rob Doolittle said in a written statement.

He said hazardous substance experts also continued working with firefighters at the scene to contain leaks and minimize environmental damage.

There was no word from federal transportation regulators, the company, or Pennsylvania State Police on the cause of the derailment in Hyndman, about 100 miles (160 km) southeast of Pittsburgh.

Thirty-two cars came off the rails as the train moved through the town just before 5 a.m. on Wednesday, the company said, and emergency managers said portions of the train plowed into a residential garage and caught fire.

CSX initially said one rail car containing liquefied petroleum gas and one car containing molten sulfur leaked and were on fire. As of Friday, CSX said the propane fire had been extinguished, though small sulfur fires continued to burn.

The governor’s office said roughly 1,000 people had been ordered to leave the town and there was no timeline, as of early Friday, for when residents might be allowed to return to their homes.

A CSX spokeswoman did not immediately respond on Friday to questions about service disruptions on the railway. The company said earlier that a nearly 80-mile stretch between Connellsville, Pennsylvania, and Cumberland, Maryland, would be affected for about a week.

The train of five locomotives and 178 rail cars was traveling from Chicago to Selkirk, New York, when it jumped the tracks, CSX said. It said 128 cars carried mixed freight, including construction materials, paper and wood pulp.

Crews were working to remove overturned rail cars from the site, the company said on Friday.

Investigators with the National Transportation Safety Board and the Federal Railroad Administration were in Hyndman, the agencies said.

Wednesday’s accident marked the third derailment for a CSX train since November. The crash happened two days after CSX Corp Chief Executive Officer Hunter Harrison apologized to customers for service disruptions and said some railroad employees were resisting planned cost-cutting measures.