A method has been developed to eliminate disturbing magnetic signals in the biomagnetic localization of arrhythmogenic sources in the heart. The procedure consists of two steps: Superimposed background activity of the heart is eliminated by subtraction of a template of pure background activity. Systematic and electronic offset is subsequently eliminated by baseline-correction during periods of zero activity. The method was applied to several kinds of arrhythmias. It was demonstrated that elimination of background activity is the prerequesite for exact localization and that the proposed procedure yields correct results.