A brain computer interface (BCI) is a communication system, which translates brain activity into commands for a computer or other devices. Nearly all BCIs contain as a core component a classification algorithm, which is employed to discriminate different brain activities using previously recorded examples of brain activity. In this paper, we study the classification accuracy achievable with a k-nearest neighbor (KNN) method based on Dempster- Shafer theory. To extract features from the electroencephalogram (EEG) signals, autoregressive (AR) models and wavelet decomposition are used. To test the classification method an EEG dataset containing signals recorded during the performance of five different mental tasks is used. We show that the Dempster-Shafer KNN classifier achieves a higher correct classification rate than the classical voting KNN classifier and the distance- weighted KNN classifier.