The basic motivation of this work is to introduce contextual information into image segmentation tasks by adding spatial coherence to the posterior probabilities corresponding to the classes present in the scene. A method for isotropic and anisotropic diffusion of vector probabilities in general, and posterior probabilities in particular, is introduced. The technique is based on diffusing via coupled partial differential equations restricted to the semi-hyperplane corresponding to probability functions. Both the partial differential equations and their corresponding numerical implementation guarantee that the vector remains a probability vector, having all its components positive and adding to one. Applying the method to posterior probabilities in classification problems, spatial and contextual coherence is introduced before the maximum a posteriori (MAP) decision, thereby improving the classification results.