MARTINEZ >> A leak led to an explosion and massive fire at a refinery with a history of issues Saturday, prompting a shelter-in-place for much of Saturday evening after black smoke spread across Martinez, Pacheco and Clyde as the blaze burned.

All of the company’s employees on site were accounted for; at a news conference around 5:20 p.m. — as warning sirens continued to sound in the background — Contra Costa County Fire Protection District Battalion Chief Bob Atlas said that three personnel had unspecified minor injuries.

Atlas said that the fire was “burning ferociously,” with an unknown amount of fuel remaining and declined to provide an estimate on when the fire would be put out.

Authorities said that a leak of hydrocarbons ignited the fire. There was not more information available Saturday evening about the cause of the leak or the type of fuel burning.

“Any smoke that burns, any combustible element, is going to be toxic at some point,” Atlas said at the news conference. “We’re trying to ascertain right now what exactly is in that stream of smoke.”

Crews rushed to the Martinez Refining Company at 3495 Pacheco Blvd. after the first call about 1:47 p.m., Atlas said. Fire Prevention Capt. Ted Leach said crews had difficulty locating the precise source of the flames when they got to the refinery.

Asked about the trouble pinpointing the blaze, Atlas said it was “not anything more than would normally be involved in industrial firefighting. There’s a lot of heavy steel in there, there’s a lot of materials that are in there, so getting to the scene of the fire takes a little bit of time.”

Flames were shooting some 200 feet into the air and giant black clouds were moving east with the wind, according to witnesses. Employees from the refinery were evacuated and could be seen gathered on Pacheco Boulevard, near the facility.

At around 5 p.m., the Contra Costa Health Services department issued a Level 3 alert, a shelter-in-place for portions of Martinez north and east of the refinery as public defense sirens alerted the immediate area surrounding the refinery. The shelter-in-place ran from the area near Mountain View Drive to the areas near Vine Hill Road and Avon Way and toward the Benicia Bridge. The department called off the shelter-in-place order at approximately 9:15 p.m., but a public health advisory remains for the affected areas.

Authorities closed Shell Avenue to all traffic. The Marina Vista Avenue on- and off-ramps to and from Interstate 680 were closed in both directions, but the freeway remained open.

Chevron Fire crews were at the scene. Coast Guard units also responded in the Carquinez Strait, about 3 miles from the refinery.

A county alert sent around 2 p.m. warned of a “public health advisory” for the incident and suggested that “individuals with respiratory sensitivities” would be most affected.

In an alert initially sent out via the county’s emergency system around 2 p.m., the company reported the incident as a Level 2 notification — which include a hazardous materials release or potential release that is expected to have off-site consequences and possibly adverse health consequences. Children and elderly individuals were advised to go inside.

“Most people will not be affected,” the advisory read. “Eye, skin, nose or throat irritation may be possible for some people in the affected area. If people experience any irritation, advise them to go inside and rinse any irritated area of their body with water.”

The MRC facility has faced a number of issues in the last year, including several incidents of unplanned flaring, an accidental release of coke dust, and an agreement to settle a legal dispute with county officials by using a continuous monitoring system to ensure their compliance with air-quality standards.

“Our biggest priority right now for this incident is the protection of the citizens and the first responders that are on scene,” Martinez Refinery PIO Brandon Matson said.