A train derailed last night in the Newington area of Fairfax County, forcing the evacuation of five houses and two office buildings for about two hours until investigators determined that two tank cars that had caused concern were carrying nothing more hazardous than soybean oil, authorities said.

The derailment, which occurred about 7:10 p.m. near Loisdale Road, involved a dozen cars of a 78-car train belonging to the Richmond, Fredericksburg and Potomac Railroad traveling north from Richmond to Alexandria, according to Fairfax County Fire Chief Warren Isman.

There were no injuries, officials said.

Isman said investigators had not yet learned why the train derailed, leaving the mangled metal cars strewn about the railroad bed and making the track impassable. It was not immediately known how fast the train was going at the time of the wreck.

The track also carries Amtrak passenger trains, which will have to be diverted indefinitely, Isman said. Passengers aboard two Amtrak trains were bused around the accident site last night, while a third passenger train was rerouted, an Amtrak official said. The official urged passengers aboard trains scheduled for today to check with a local Amtrak agent.

The fire chief said attempts to determine what the train's three tank cars were carrying were hindered when the train's engineer refused for almost 40 minutes to show fire investigators the train's on-board shipping documents, which list the contents of the cars.