The classification task is one of the most important problems in the area of data mining. In this paper we propose a new algorithm for addressing this problem. The main idea derives from the well-known algorithm of k-nearest-neighbors. In the proposed approach, given an unclassified pattern, a set of neighboring patterns is found, but not necessarily using all input feature dimensions. Also, following the concept of the naïve Bayesian classifier, independence of input feature dimensions in the outcome of the classification task is assumed. The two concepts are merged in an attempt to take advantage of their good performance features. Experimental results have shown superior performance of the proposed method in comparison with the aforementioned algorithms and their variations.