Sulfur is a major by-product of oil refining and gas processing. Most crude oil grades contain some sulfur, most of which must be removed during the refining process to meet strict sulfur content limits in refined products. This is typically done through hydrotreating and results in production of H2S gas, which is converted into elemental sulfur in the sulfur recovery unit. The resultant elemental sulfur is in a molten state and can either be sold as a heated liquid or (more commonly) converted to solid form as granules or pestles. Sulfur can also be mined from underground as it is naturally-occurring deposits.
Most of the sulfur produced by refineries is sold into the petrochemicals market where it is used to make sulfuric acid. Sulfur is also used as mineral fertilizer.