Steel pipe cemented in place in an oil or gas well as the drilling progresses or when the well is completed. The casing serves several purposes: (1) to prevent the [[formation]] walls from caving or squeezing into the hole during drilling; (2) to protect one formation from damage when heavy [[mud]] weights are required in drilling another; (3) to provide a means to isolate porous and [[permeability|permeable]] formations from one another at the wellbore; (4) to prevent contamination of shallow [[aquifer|aquifers]] by drilling [[mud|muds]]. See also [[casing string]].