Spatial EEG filters are widely used to isolate event-related potential (ERP) components. The most commonly used spatial filters (e.g., the average reference and the surface Laplacian) are "stationary." Stationary filters are conceptually simple, easy to use, and fast to compute, but all assume that the EEG signal does not change across sensors and time. Given that ERPs are intrinsically nonstationary, applying stationary filters can lead to misinterpretations of the measured neural activity. In contrast, "adaptive" spatial filters (e.g., independent component analysis, ICA; and principal component analysis, PCA) infer their weights directly from the spatial properties of the data. They are, thus, not affected by the shortcomings of stationary filters. The issue with adaptive filters is that understanding how they work and how to interpret their output require advanced statistical and physiological knowledge. Here, we describe a novel, easy-to-use, and conceptually simple adaptive filter (local spatial analysis, LSA) for highlighting local components masked by large widespread activity. This approach exploits the statistical information stored in the trial-by-trial variability of stimulus-evoked neural activity to estimate the spatial filter parameters adaptively at each time point. Using both simulated data and real ERPs elicited by stimuli of four different sensory modalities (audition, vision, touch, and pain), we show that this method outperforms widely used stationary filters and allows to identify novel ERP components masked by large widespread activity. Implementation of the LSA filter in MATLAB is freely available to download.NEW & NOTEWORTHY EEG spatial filtering is important for exploring brain function. Two classes of filters are commonly used: stationary and adaptive. Stationary filters are simple to use but wrongly assume that stimulus-evoked EEG responses (ERPs) are stationary. Adaptive filters do not make this assumption but require solid statistical and physiological knowledge. Bridging this gap, we present local spatial analysis (LSA), an adaptive, yet computationally simple, spatial filter based on linear regression that separates local and widespread brain activity (https://www.iannettilab.net/lsa.html or https://github.com/rorybufacchi/LSA-filter).