People living near the site of a freight train derailment in rural northern Los Angeles County were allowed back in their homes Thursday morning as crews worked to right 21 toppled cars.

The evacuation order for 250 homes in the rural Antelope Valley desert area was lifted at about 1 a.m., Los Angeles County fire dispatch supervisor Robert Diaz said.

Union Pacific Corp. crews worked through the night to raise up the overturned cars and could be finished as early as noon, Diaz said.

No one was injured after 21 of 68 cars toppled off the tracks Wednesday afternoon. Six of the cars typically carried hazardous materials but they were empty, Union Pacific spokesman Aaron Hunt said.

Nonetheless, a hazardous materials team inspected the tank cars in case there were residual substances inside that may have leaked.

The cars had residual chlorine and hydrogen fluoride, but experts found no leaks, Los Angeles County fire inspector Don Kunitomi said.

The tank cars were designed to withstand a derailment by having the wheels come off one side of the track and the tanks fall down the other side, county fire Deputy Chief Mike Metro said Wednesday.

Kristy Swind, 28, said she was home on Wednesday when she saw some train cars slamming on their brakes, although they remained upright.

"I saw, like, a cloud of smoke ... you could hear people yelling and screaming," she said. "It was actually a dirt cloud from the train falling over."

She walked across a nearby field to the wreck site and saw the toppled cars. Authorities told her they were concerned about possible chlorine leaks.

She waited about an hour until her husband returned. Swind said she packed a bag of clothes and the couple; their 8-month-old son, Brody; 4-year-old son Jacob, and the family's Rottweiler and Labrador retriever all loaded into the car. They drove 40 miles to spend the night with her parents, then returned home on Thursday morning.

Littlerock is at the foot of the northern face of the San Gabriel Mountains, which separate the Mojave Desert from metropolitan Los Angeles.