Occurrence of shadowy pixels in remote sensing images is a common phenomenon particularly with passive sensors. In these cases, analysts may mistakenly treat these pixels as a separate land cover class. This may result in the loss of information present in the shadow pixels A better approach may be to correct light intensity values in shadowy pixels and use the light-corrected image to produce the land cover map. Most light intensity correction algorithms are not designed to optimize classification performance. Consequently, the accuracy of the resulting land cover map may be degraded. To address this problem, this paper proposes an algorithm that employs the maximum a posteriori criterion for classifying a multispectral image in the presence of shadows. The observed image is assumed to be the product of a shadow-free image with a light intensity image along with an additive measurement noise. The main purpose of this algorithm is to find the most likely land cover map along with the shadow-free image and light intensity image as byproducts. Our results show that a large number of misclassified pixels can be corrected. Furthermore, in the shadow-free image, the materials in the shadowy regions can also be successfully reconstructed.