In the General Linear Model (GLM) framework for the statistical analysis of fMRI data, the problem of temporal autocorrelations in the residual signal (after regression) has been frequently addressed in the open literature. There exist various methods for correcting the ensuing bias in the statistical testing, among which the prewhitening strategy, which uses a prewhitening matrix for rendering the residual signal white (i.e., without temporal autocorrelations). This correction is only exact when the autocorrelation structure of the noise-generating process is accurately known, and the estimates derived from the fMRI data are too noisy to be used for correction. Recently, Worsley and coworkers proposed to spatially smooth the noisy autocorrelation estimates, effectively reducing their variance and allowing for a better correction. In this article, a systematic study into the effect of the smoothing kernel width is performed and a method is introduced for choosing this bandwidth in an -optimar, manner. Several aspects of the prewhitening strategy are investigated, namely the choice of the autocorrelation estimate (biased or unbiased), the accuracy of the estimates, the degree of spatial regularisation and the order of the autoregressive model used for characterising the noise. The proposed method is extensively evaluated on both synthetic and real fMRI data. (C) 2004 Elsevier Inc. All rights reserved.