The filtering technique for dimensionality reduction of multichannel electroencephalogram (EEG) recordings, modeled using common spatial patterns and its variants, is commonly used in two-class brain-computer interfaces (BCI). For a multiclass problem, the optimization of certain separability criteria in the output space is not directly related to the classification error of EEG single-trial segments . In this paper, we derive a new discriminant criterion, termed weighted pairwise criterion (WPC), for optimizing multiclass filters by minimizing the upper bound of the Bayesian error that is intentionally formulated for classifying EEG single-trial segments. The WPC approach pays more attention to close class pairs that are more likely to be misclassified than far away class pairs that are already well separated. Moreover, we extend WPC by integrating temporal information of EEG series. Computationally, we employ the rank-one update and power iteration technique to optimize the proposed discriminant criterion. The experiments of multiclass classification on the datasets of BCI competitions demonstrate the efficacy of the proposed method.