Much current research in functional magnetic resonance imaging (fMRI) employs multivariate machine learning approaches (e.g., support vector machines) to detect distributed spatial patterns from the temporal fluctuations of the neural signal. The aim of many studies is not classification, however, but investigation of multivariate spatial patterns, which pattern classifiers detect only indirectly. Here we propose a direct statistical measure for the existence of distributed spatial patterns (or spatial heterogeneity) applicable to fMRI datasets. We extend the univariate general linear model (GLM), typically used in fMRI analysis, to a multivariate case. We demonstrate that contrasting maximum likelihood estimations of different restrictions on this multivariate model can be used to estimate the extent of spatial heterogeneity in fMRI data. Under asymptotic assumptions inference can be made with reference to the χ2 distribution. The test statistic is then assessed using simulated timecourses derived from real fMRI data followed by analyzing data from a real fMRI experiment. These analyses demonstrate the utility of the proposed measure of heterogeneity as well as considerations in its application. Measuring spatial heterogeneity in fMRI has important theoretical implications in its own right and may have potential uses for better characterising neurological conditions such as stroke and Alzheimer's disease.