Buoyancy driven instability in a horizontal layer of electrically conducting fluid in the presence of a vertical magnetic field