Abstract. Magnetotactic bacteria are aquatic microorganisms with the ability to swim along the field lines of a magnetic field, which in their natural environment is provided by the magnetic field of the Earth. They do so with the help of specialized magnetic organelles called magnetosomes, vesicles containing magnetic crystals. Magnetosomes are aligned along cytoskeletal filaments to give linear structures that can function as intracellular compass needles. The predominant viewpoint is that the cells passively align with an external magnetic field, just like a macroscopic compass needle, but swim actively along the field lines, propelled by their flagella. In this minireview, we give an introduction to this intriguing bacterial behavior and discuss recent advances in understanding it, with a focus on the swimming directionality, which is not only affected by magnetic fields, but also by gradients of the oxygen concentration.