Stationary subspace analysis (SSA) is a recent technique for finding linear transformations of nonstationary processes that are stationary in the limited sense that the first two moments or means and lag‐0 covariances are time‐invariant. It finds a matrix that projects the nonstationary data onto a stationary subspace by minimizing a Kullback–Leibler divergence between Gaussian distributions measuring the nonconstancy of the means and covariances across several segments. We propose an SSA procedure for general multivariate, second‐order nonstationary processes. It relies on the asymptotic uncorrelatedness of the discrete Fourier transform of a stationary time series to define a measure of departure from stationarity, which is then minimized to find the stationary subspace. The dimension of the subspace is estimated using a sequential testing procedure, and its asymptotic properties are discussed. We illustrate the broader applicability and better performance of our method in comparison to existing SSA methods through simulations and discuss an application in analyzing electroencephalogram (EEG) data from brain–computer interface (BCI) experiments.