A Union Pacific freight train went off its tracks Wednesday morning, sending eight freight cars within feet of a row of homes in the Denton County city of Aubrey.[[504105021,R]]

In a statement to NBC 5 Union Pacific said a locomotive and six rail cars derailed upright while another seven overturned at about 9:30 a.m.

Video from Texas Sky Ranger showed at least eight rail cars piled up along the tracks that split Pecan Street east of South Main Street -- many of the rail cars were off of their wheels.

Throughout the day, dozens of people stopped to take pictures of the wreckage, or just to see it for themselves.

"Biggest thing that's gone on around here in a while," said Aubrey resident Daniel Smith.

Some of the cars appeared to have missed hitting one of the homes on Pecan by only a few inches. Debris from the derailment does appear to have contacted a garage detached from a home on the north sided of Pecan.

Rick Huckabee, who lives at that home not far from the tracks, says he heard what sounded to him like an earthquake. He was working in his shop, and felt the rumble of the derailment.

"Whole lot of rattling and shaking," said Huckabee. "I've never been in a major earthquake, but I think that's what it would sound like."

The derailment occurred near a switch, but Union Pacific has not yet determined what caused train to jump the tracks and is investigating the incident.

Photos: Derailed Train Nearly Hits Home in Aubrey

"We are working to quickly and safely clear the mainline. An inspection team will look at the tracks and make any necessary repairs," Union Pacific said in a statement.

Union Pacific said no injuries were reported and there were no hazardous materials on the train. Heavy machinery was brought to the scene to help with the removal of the derailed cars, which began Wednesday afternoon. The rail operator says once those cars are removed and the track is repaired, rail service could resume by Thursday evening.

Road Closures:

377 & Stewart (south of Krugerville)

New Hope Road & Cortes railroad crossing (Aubrey)

South Main Street & Spring Hill Road railroad crossing (Aubrey)

Plum Street railroad crossing (Aubrey)

Elm Street railroad crossing (Aubrey)

Check back and refresh this page for the latest update. As this story is developing, elements may change.