This paper proposes a novel method for automatic classification of magnetic resonance images (MRI) based on independent component analysis (ICA). Our methodology consists of three processing steps. First, all the MRI scans are normalized and segmented into gray matter, white matter and cerebrospinal fluid. Then, ICA is applied to the preprocessed images for extracting relevant features which will be used as inputs to a support vector machine (SVM) classifier in order to reduce the feature space dimensionality. The system discriminates between Alzheimer's disease (AD) patients, mild cognitive impairment (MCI), and normal control (NC) subjects. All MRI data used in this work were obtained from the Alzheimers Disease Neuroimaging Initiative (ADNI). The experimental results showed that our methodology can successfully discriminate AD and MCI patients from NC subjects.