A leak of hazardous and corrosive chemicals from a tank truck shut down the Capital Beltway in Fairfax County south of Alexandria at the height of the evening rush hour yesterday, backing up traffic for miles and forcing the temporary evacuation of scores of homes.

The transfer of the remaining contents of the leaking vehicle into a second tanker was completed just before midnight, and authorities said they hoped that the Beltway, which was closed between Van Dorn Street and Shirley Highway (I-95), would reopen well before this morning's rush hour.

They said they expected to keep one or two of the right lanes of the highway's outer loop closed until all contamination is removed.

Earlier, while members of Fairfax County's special hazardous materials unit labored in ungainly yellow protective suits to dam the spill, the tanker, parked on the outer loop of the Beltway about a half-mile west of Van Dorn Street, leaked at an apparently increasing rate.

County Fire Chief Warren E. Isman cautioned that the leaking vehicle could crack open, and firefighters stood by with hoses trained on the vehicle. At one point about 7,000 cars were trapped on the shut-down 2 1/4-mile segment of the Beltway, some for as long as two hours, state police said.

The cause of the leak was not immediately known. It involved at least six chemicals, listed as hydrazine, thiourea, ethyline dimine, ethylene diamine tetraacetic acid, ammonium hydroxide and sulfate compounds.

Authorities singled out hydrazine, thiourea and ethyline dimine as particularly capable of burning skin and lungs on contact. However, they said papers carried in the truck listed all six chemicals as corrosive.

Isman said that although the leaking materials were vaporizing, and therefore could be spread some distance, they were "not an immediate threat." "You would have to get a good whiff of it before it could harm you," he said.

The driver of the 20-wheel tanker, Aaron Swain, said a motorist behind him flagged him down on the Beltway shortly before 5 p.m. Swain pulled over, alighted from his cab and spotted the leak, coming from the rear underside of his tanker. "I couldn't stop it," he told a reporter.

According to authorities, the 5,000 gallons of chemicals originally in the tanker were waste materials or byproducts from the cleaning of Navy vessels at the Norfolk Naval Shipyard in Portsmouth, Va.

The truck, owned by Applied Technology, a Toms River, N.J., hazardous waste hauler, was en route to a treatment plant in Deepwater, N.J.

After the truck pulled over to the Beltway's right-hand shoulder, police and fire personnel arrived and shut down the highway at Van Dorn Street on the east and Shirley Highway on the west.

Motorists were diverted onto nearby arteries, including Franconia Road, to bypass the area, but congestion was reported severe late into the night. At one point eastbound traffic was reported backed up to Springfield, and westbound traffic to Telegraph Road.

Deborah A. Schaefer, a leasing consultant from St. Mary's County, Md., who was headed west toward Van Dorn Street on the Beltway, said it took her almost three hours to travel about a mile and a half at the peak of the snarl.

"I was worried about the exhaust from all of the other cars as well as the spread of vapor," she said.

While traffic was stalled, she said, engines overheated and motorists left their autos and struck up conversations. Some gave jump-starts to those whose batteries had died.

The tracks of the Richmond, Fredericksburg & Potomac Railroad, which pass beneath the Beltway near the scene of the leak, were shut down, a county fire department spokesman said.

No serious injuries were reported. One person was treated at Fairfax Hospital and released. Details were not available.

With the wind blowing from the north, authorities evacuated about 200 to 300 persons from the Mount Hebron Park neighborhood south of the spill. Residents were asked to leave houses on Tilbury Road, Howells Road, Cobb Road and Valley View Drive.

Elizabeth Fenimore was outdoors when she learned of the evacuations and returned to her home on Tilbury Road to get her 95-year-old mother. "I hate to tell her this," Fenimore said. "It will scare her."

The Fairfax County Chapter of the American Red Cross said it fed 250 evacuees last night at Edison High School at Franconia Road and South Van Dorn Street.

Preparations were under way to shelter them and as many as 50 more at the school for the night if necessary. However, evacuees were told they could return to their homes at 11:45 p.m., after the chemicals had been transferred to the second tanker, which had arrived here from the Norfolk area about two hours earlier.

Authorities described the leak in the tanker truck as "spontaneous," meaning it did not stem from a known cause, and they said it appeared to be in a welded seam.

Isman said the leak could not be readily plugged because it appeared to stem from separate holes or cracks in the inner and outer shells of the double-walled tanker.

He said the holes were at different spots in each, making the inner leak inaccessible from the outside.

While the tanker's inner shell has a corrosion-resistant lining, Isman said that with it broken, the chemicals could have eaten through the outer container, causing the tanker to burst open suddenly.

The leak was described as a slow drip while the truck was moving. Authorities said the chemicals that spilled on the roadway while the truck was traveling evaporated relatively quickly. By last night, however, they said the truck was leak- ing at a rate estimated at as much as three gallons a minute.

Members of the hazardous materials unit, lumbering about in 80-pound protective garments that resemble spacesuits, worked into the night in the glare of floodlights, surrounded by a fleet of emergency vehicles. By one estimate, they spread 21 tons of sand in five hours.

Authorities said that to avoid contamination the workers might have to dig up and haul away much of the soil and roadway onto which the chemicals had spilled.