WESTMINSTER, COLO. — Crews worked beneath a dangerously sagging highway bridge Saturday to recover the last two bodies from the smoldering wreckage of two freight trains that collided head-on, killing five people.

The bodies of three Burlington Northern crewmen were recovered within hours of the Friday night crash, but cleanup was slowed by the threat of a buckled bridge on U.S. Highway 36, the main route between Denver and Boulder.

''That bridge is coming down and it's possible it will collapse when the wreckage is removed,'' said Bob Deutsch, the public information officer for the Jefferson County sheriff's office. ''The mangled cars are wedged up against the metal supports for the bridge.''

Both Burlington Northern trains were traveling at 40 to 50 mph when they collided under the bridge, sending a mushroom cloud into the air, a railroad spokesman said. The conductors in the caboose of each train were the only survivors.

Heat from the resulting fire could be felt in the scattered subdivisions that surround the crash site in the northwest corner of metropolitan Denver. No residents or motorists on the highway were injured.

The northbound 42-car train was pulled by three locomotives and was hauling freight between Denver and Cheyenne, Wyo. The southbound train was pulled by two locomotives and carrying 32 open cars of gravel from Longmont, Colo., to Denver.

Both crews were from the Denver-Boulder area, said Bill Joplin, regional manager of corporate communications for the railroad. No names were released until the remaining bodies were recovered and families could be notified.

''We don't know what happened or why they were on the same track,'' said Joplin. ''The traffic on this track is governed by train orders from the dispatcher in McCook, Nebraska. This is not an electronically controlled track.''