FORT WORTH, Texas — A freight train has derailed in Fort Worth, knocking out power to the area.

About 40 train cars were traveling north of downtown early Wednesday when the derailment occurred and about 20 cars slid off the tracks. The BNSF train was carrying lumber and other mixed freight. No one was hurt.

BNSF Railway spokesman Joe Faust says the cause of the derailment is under investigation, but it occurred during a "switching operation" in which portions of different trains are taken to assemble a new train.

BNSF Railway is based in Fort Worth. Officials expect cleanup to take all day.

The derailment pulled down power lines, and authorities cut electricity in the area as a precautionary measure. It occurred near Meacham International Airport but there has been no disruption to flights.