Recently, representation-based classifications have gained increasing interest in hyperspectral imagery, such as the newly proposed sparse-representation classification and nearest-regularized subspace (NRS). These classifiers provide excellent performance that is comparable to or even better than the classic support vector machine. However, all these representation-based methods were originally designed to be pixel-wise classifiers which only consider the spectral signature while ignoring the spatial-contextual information. A Markov random field (MRF), providing a basis for modeling contextual constraints, has currently been successfully applied for hyperspectral image analysis. We mainly investigate the benefits of combining these representation-based classifications with an MRF model in order to acquire better classification results. Two real hyperspectral images are used to validate the proposed classification scheme. Experimental results demonstrated that the proposed method significantly outperforms other state-of-the-art approaches. For example, NRS-MRF performed with an accuracy of 94.92% for the Reflective Optics System Imaging Spectrometer data with 60 training samples per class, while the original NRS obtained an accuracy of 81.95%, an improvement of approximately 13%.