Updated

Interstate 15 in Hesperia, Calif. is expected to remain closed in both directions for up to two days after a fire was accidentally ignited by a worker at a bridge construction site Monday.

The freeway -- Southern California's main connector to Las Vegas -- was closed around 1:30 p.m. because of falling debris.

Officials said drivers should stay away from the Cajon Pass, which is just south of the area of Interstate 15 closed by the fire. Traffic was backed up 6 miles to the south and up to 20 miles to the north Monday evening.

The blaze was started when a construction worker's blowtorch accidentally ignited the wooden supports of the Ranchero Road overpass bridge, said San Bernardino County Fire Capt. Josh Wilkins.

Dozens of firefighters battled the blaze in windy conditions, with limited access to water, and high danger that the wooden skeleton of the football-field-sized bridge would collapse.

By Monday night most flames were out aside from some smoldering; firefighters were expected to remain throughout the night, said Caltrans spokeswoman Terri Kasinga.

Caltrans crews worked into the evening demolishing remnants of the wooden skeleton of the bridge, which had been under construction since early 2013, Kasinga said.

When the fire erupted, Caltrans contractors were still working on top of the bridge and unaware of the blaze until being evacuated by firefighters because the flames were being pushed away by the wind. One worker suffered smoke inhalation, Wilkins said.

"The Cajon Pass is going to be a nightmare for the next 24 to 48 hours at least," Wilkins said. "So if at all possible, avoid it altogether, because there is just no way they're going to open it any time soon."

Kasinga recommended drivers use alternate routes including interstates 138 and 18.