The density of drilling mud is controlled by adding weighting agents, such as barite or hematite, to increase its density. The density is adjusted to match the downhole pressure and prevent formation influx or well control issues.