A tank truck carrying 4,000 gallons of highly toxic hydrogen peroxide overturned on a Capital Beltway ramp to Shirley Highway last night, causing a mile-long taffic jam as the chemical leaked onto the pavement.

Virginia state troopers routed traffic away from the elevated ramp that carries beltway traffic to southbound Shirley Highway, and firefighters kept a stream of water directed at the truck to dilute the leaking chemicals.

A second truck was dispatched from Philadelphia to pump the cargo from the first and haul it away. The cleanup operation was expected to be complete by this morning's rush hour.

Tim Bowen of Edgewater, Md., whose car was behind the truck when the accident occurred, said "the rear wheels just suddenly lifted off the ground and the tank section came loose from the trailer."

Bowen and Paul Morabito of Springfield said they rushed to pull the driver and his passenger from the wreckage. "There was a guy in the sleeper section of the cab," said Bowen. "The driver was just hanging out of the cab, unconscious."

The driver, Dan Mobilio, 58, of Cornwell Heights, Pa., was admitted to Alexandria Hospital for observation of a possible head injury. The passenger, Gerald McKelvey, 56, of Norristown, Pa., was treated at the hospital for an ankle injury.

Fairfax County rescue workers said the driver of the Intsel Chemical Co. rig apparently lost control when his cargo shifted unexpectedly. The tank truck was headed to Knoxville, Tenn., they said.

Fairfax Fire and Rescue Services spokesman Stephanie Hoover said the Philadelphia-based chemical company warned that the hydrogen peroxide "could ignite or explode if it comes in contact with any combustibles."