Accurate diagnosis is crucial for successful treatment of the brain tumor. Accordingly in this paper, we propose an intelligent content-based image retrieval (CBIR) system which retrieves similar pathology bearing magnetic resonance (MR) images of the brain from a medical database to assist the radiologist in the diagnosis of the brain tumor. A single feature vector will not perform well for finding similar images in the medical domain as images within the same disease class differ by severity, density and other such factors. To handle this problem, the proposed CBIR system uses a two-step approach to retrieve similar MR images. The first step classifies the query image as benign or malignant using the features that discriminate the classes. The second step then retrieves the most similar images within the predicted class using the features that distinguish the subclasses. In order to provide faster image retrieval, we propose an indexing method called clustering with principal component analysis (PCA) and KD-tree which groups subclass features into clusters using modified K-means clustering and separately reduces the dimensionality of each cluster using PCA. The reduced feature set is then indexed using a KD-tree. The proposed CBIR system is also made robust against misalignment that occurs during MR image acquisition. Experiments were carried out on a database consisting of 820 MR images of the brain tumor. The experimental results demonstrate the effectiveness of the proposed system and show the viability of clinical application.