RICHMOND (CBS SF) — Chevron and the state Department of Occupational Safety and Health Monday announced a settlement that calls for equipment and safety upgrades worth around $20 million following a 2012 fire at the oil giant’s Richmond refinery.

The settlement was reached after Chevron appealed citations issued by Cal/OSHA for 17 workplace safety and health citations in connection with the fire at its Richmond refinery on Aug. 6, 2012.

READ MORE: 1 Killed, 2 Injured in Sonoma County Crash on Route 116

The fire, caused by a corroded and leaky pipe, released a vapor cloud that engulfed 19 workers who were making repairs.

Within minutes, the vapor ignited into a wall of flames. A massive cloud of black smoke was released that could be seen all across the Bay Area.

Six of those alleged violations were considered serious and nine willful in nature, according to Cal/OSHA.

State regulators have now agreed to drop nine violations and downgrade five others in return for Chevron’s agreement to a set of safety measures.

READ MORE: French Bulldog Stolen at Gunpoint During Castro Valley Armed Robbery

Those measures include the replacement of all carbon-steel piping used to transport corrosive liquids with chrome-alloy piping, which is more corrosion-resistant, and the development and implementation of procedures to monitor equipment and alert operators when it should be replaced.

The new piping is in excess of current standards for refineries, and the monitoring procedures are considered a new and innovative practice, regulators said today.

In addition, Chevron has agreed to provide specialized training to fire department personnel working at the refinery on incident command and hazard recognition and emergency response, as well as eight additional hours of process safety management to refinery operators.

The refinery will also donate $200,000 to the Regional Occupational Program in Richmond, a job readiness program intended to help prepare students for jobs in the petrochemical and related industries, and pay citation penalties of more than $100,000.

The fire, which triggered a widespread shelter-in-place order, injured three Chevron employees and caused hundreds of residents to complain of respiratory problems.

MORE NEWS: Stockton Police Investigate Separate Weekend Shootings That Left 1 Dead, 2 Injured

TM and © Copyright 2017 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2017 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News Service contributed to this report.