The common spatial pattern (CSP) approach is known as one of the most popular spatial filtering techniques for EEG classification in motor imagery (MI) based brain-computer interfaces (BCIs). However, it still suffers some drawbacks such as sensitivity to noise, non-stationarity, and limitation to binary classification.Therefore, we propose a novel spatial filtering framework called scaCSP based on the scatter matrices of spatial covariances of EEG signals, which works generally in both binary and multi-class problems whereas CSP can be cast into our framework as a special case when only the range space of the between-class scatter matrix is used in binary cases.We further propose subspace enhanced scaCSP algorithms which easily permit incorporating more discriminative information contained in other range spaces and null spaces of the between-class and within-class scatter matrices in two scenarios: a nullspace components reduction scenario and an additional spatial filter learning scenario.The proposed algorithms are evaluated on two data sets including 4 MI tasks. The classification performance is compared against state-of-the-art competing algorithms: CSP, Tikhonov regularized CSP (TRCSP), stationary CSP (sCSP) and stationary TRCSP (sTRCSP) in the binary problems whilst multi-class extensions of CSP based on pair-wise and one-versus-rest techniques in the multi-class problems. The results show that the proposed framework outperforms all the competing algorithms in terms of average classification accuracy and computational efficiency in both binary and multi-class problems.The proposed scsCSP works as a unified framework for general multi-class problems and is promising for improving the performance of MI-BCIs.