In this paper we consider a Hamiltonian H on P-2(R-2d), the set of probability measures with finite quadratic moments on the phase space R-2d = R-d x R-d, which is a metric space when endowed with the Wasserstein distance W-2. We study the initial value problem d mu(t)/dt+del center dot(J(d)V(t)mu(t)) = 0, where J(d) is the canonical symplectic matrix, mu(0) is prescribed, and v(t) is a tangent vector to P-2(R-2d) at mu(t), belonging to partial derivative H(mu(t)), the subdifferential of H at mu(t). Two methods for constructing solutions of the evolutive system are provided. The first one concerns only the case where mu(0) is absolutely continuous. It ensures that mu(t) remains absolutely continuous and v(t) = del H (mu(t)) is the element of minimal norm in partial derivative H(mu(t)). The second method handles any initial measure mu(0). If we further assume that H is lambda-convex, proper, and lower-semicontinuous on P-2(R-2d) we prove that the Hamiltonian is preserved along any solution of our evolutive system, H(mu(t)) = H(mu(0)). (c) 2007 Wiley Periodicals, Inc.