We present the results of an experimental investigation of the effect of a magnetic field on the stability of convection in a liquid metal. A rectangular container of gallium is subjected to a horizontal temperature gradient and a uniform magnetic field is applied separately in three directions. The magnetic field suppresses the oscillation most effectively when it is applied in the vertical direction and is least efficient when applied in the direction of the temperature gradient. The critical temperature difference required for the onset of oscillations is found to scale exponentially with the magnitude of the magnetic field for all three orientations. Comparisons are made with available theory and qualitative differences are discussed.