The simultaneous recording of electroencephalogram (EEG) and functional magnetic resonance image (fMRI) is a promising tool that is capable of providing hi.-h spatiotemporal brain mapping, with each modality supplying complementary information. One of the major barriers to obtain high-quality simultaneous EEG/fMR1 data is that pulsatile activity due to the heartbeat induces significant artifacts in the EEG. The purpose of this study was to develop a novel algorithm for removing heartbeat artifact, thus overcoming problems associated with previous methods. Our method consists of a mean artifact wave form subtraction, the selective removal of wavelet coefficients, and a recursive least-square adaptive filtering. The recursive least-square adaptive filtering operates without dedicated sensor for the reference signal, and only when the mean subtraction and wavelet-based noise removal is not satisfactory. The performance of our system has been assessed using simulated data based on experimental data of various spectral characteristics, and actual experimental data of alpha-wave-dominant normal EEG and epileptic EEG. (C) 2004 Elsevier B.V. All rights reserved.