Magnetic contamination of the drilling fluid shields the Earth's magnetic field measured by the magnetic sensors, and may contribute significantly to errors in directional surveying of a wellbore. A series of laboratory measurements were performed to investigate such magnetic shielding effects. In the measurement, a single axis fluxgate magnetometer was immersed in model drilling fluids prepared by mixing powders of known magnetic properties (magnetite and pure iron) into a solution of xanthan gum in fresh water, whereafter the vertical component of the Earth's field inside the fluid was measured. It was found that the strong shielding effect of dry iron powder essentially vanished when was suspended in the drilling fluid. The magnetic shielding caused by magnetite, however, remained significant also in solution, showing a complex dynamical behaviour. Initially the magnetic field was significantly damped, and this shielding was found to increase further for the next hour or so, reaching a fairly sharp maximum. The shielding then started to decay slowly and irregularly again over the next few days.