We propose a nonlinear kernel version of recently introduced basic thresholding classifier (BTC) for hyperspectral image (HSI) classification. BTC is a sparsity-based linear classifier, which utilizes inner product for similarity measure based on the fact that the hyperspectral data are linearly separable in the feature space. In practice, the pixels of different classes of a given HSI are not always distinct and may overlap. This is known as the inseparability problem, which reduces the performance of a linear classifier. In order to solve this problem in the feature space, we propose the kernel BTC (KBTC) algorithm that achieves promising performance by utilizing well-known "kernel trick." To increase the classification accuracy further, we present spatial-spectral KBTC that incorporates spatial information using weighted least squares filter with a guidance image. Furthermore, we apply L-0 smoothing technique on the guidance image, which provides additional improvements. Experimental results on publicly available HSI data sets showed that the proposal and its spatial extension yield better classification results as compared with linear similarity-based BTC, nonlinear kernel-based support vector machines, kernel orthogonal matching pursuit, recently proposed logistic regression via splitting and augmented Lagrangian, and their spatial extensions.