Authorities in Southern California on Friday were racing to figure out how to prevent the explosion of a storage tank that has been leaking a hazardous chemical used to make plastic parts, as some 40,000 people were under evacuation orders in the area.

A storage tank holding between 6,000 and 7,000 gallons (22,700 and 26,500 liters) of methyl methacrylate overheated Thursday and began venting vapors into the air at an aerospace plastics facility in Garden Grove, a city in Orange County, the local fire authority said.

The tank could fail and crack, releasing the chemical onto the ground, or it could explode, Orange County Fire Authority Division Chief Craig Covey said Friday.

"This thing is going to fail, and we don't know when," Covey said. "We're doing our best to figure out when or how we can prevent it."

Officials ordered residents in Garden Grove to leave and expanded evacuation orders Friday to some residents of five other Orange County cities — Cypress, Stanton, Anaheim, Buena Park and Westminster — after being unable to stop the leak overnight on the tank at GKN Aerospace, which makes parts for commercial and military aircraft.