The formulation and application of an algorithm based on partial differential equations for processing underwater images are presented. The proposed algorithm performs simultaneous smoothing and enhancement operations on the image and yields better contrast enhancement, color correction, and rendition compared to conventional algorithms. Further modification of the proposed algorithm and its combination with the powerful contrast-limited adaptive histogram equalization (CLAHE) method using an adaptive computation of the clip limit enhances the local enhancement results while mitigating the color distortion and intrinsic noise enhancement observed in the CLAHE algorithm. Ultimately, an optimized version of the algorithm based on image information metric is developed for best possible results for all images. The method is compared with existing algorithms from the literature using subjective and objective measures, and results indicate considerable improvement over several well-known algorithms.