A pacemaker comprises an implantable pacemaker housing and a pacemaker electrode provided to transmit stimulation impulses, and a detector for a current which can be induced by an external magnetic field and flowing through the pacemaker electrode. A circuit element is provided to interrupt this inducible current.