We propose a new approach, intrinsic to the Wasserstein space, which allows us to prove a weak KAM theorem on P(Td), the space of probability measures on the torus, for any d. This space is analyzed in detail, facilitating the study of the asymptotic behavior/invariant measures associated with minimizing trajectories of a class of Lagrangians of practical importance. (This is a joint work with A. Tudorascu).