OSHAWA, Ont. - Residents asked to leave their homes when 27 cars of a freight train careened off the tracks and into their neighbourhood east of Toronto were given the green light to go return Saturday afternoon.

Oshawa Mayor John Gray announced that the precautionary evacuation was over, about 24 hours after it began Friday afternoon.

"We should be able to restore some normalcy to people's lives," he told reporters with a smile while standing metres from the crash site.

Crews worked through the day clearing the tangled mess of the train wreck and were expected to continue working through until Sunday.

On Saturday, Canadian Pacific shuttled the remainder of the 111-cars that didn't jump off the rails out of the area. By mid-day firefighters had left the area and CP was hoisting the toppled cars off their sides so they too could be removed.

People living in 107 homes and three apartment buildings nearby were asked to leave their residences Friday for what police called precautionary purposes.

CP said some cars on the freight train were hauling chemicals.

A tanker carrying hydrogen peroxide, a common chemical used for a variety of purposes in homes and businesses, was among the rail cars that derailed, but it was not leaking, said Canadian Pacific spokesman Mike LoVecchio.

"(The crews are) methodically clearing the derailed cars," he said.

"They're being moved to one side of the tracks and then once the tracks are re-installed, the cars will be loaded onto flatbed cars and removed from the area."

White powder visible in aerial views of the derailment is spilled limestone slurry, which is not a "regulated" substance and poses no danger, LoVecchio said.

Gray said overall, Oshawa had been fortunate in terms of how the crash developed.

"We've had no loss of life, we were able to maintain a very safe environment for everyone and most especially, all of the emergency crews that were responsible worked well together," he said.

"I think this has been an excellent exercise for us, most especially it points out just a few minor things that I think we can fine tune in the future."

Robert Joseph, who slept in a hotel over night with his girlfriend because he couldn't go home after work Friday, was feeling "great" on being permitted to return.

"(I) didn't expect to spend the weekend like this, but it's good to be back home," he said.

He called the entire experience "a royal pain."

"It wasn't very organized, I felt bad for the people that were outside last night," he said.

"There's a lot of older people that live in those apartment houses and there was absolutely not one person that came over from the mayor's office or CP or Durham Region, nobody was catering to those older people."

The Transportation Safety Board may take up to two to three weeks to report on cause of crash, Gray said. Investigators were probing one particular locomotive that has already been hauled from the scene.

"They've indicated this is going to be the source of their investigating," he said.

LoVecchio, too, couldn't say how long the clearing effort would take, only that "the priority is to do it in a safe manner."