We propose a cosmological scenario involving a single scalar field, \varphi, that is a source of Dark Matter as well as Dark Energy. The Lagrangian density of \varphi contains a second field \chi, for simplicity assumed to be a scalar. For fixed values of \chi, the potential of \varphi decays exponentially at large positive \varphi-values. While \varphi is not coupled to Standard Model fields, \chi is assumed to couple to them. Hence, the Green functions of \chi depend on the temperature of the local equilibrium in the expanding universe. We assume that the coupling of \chi to \varphi is such that, at temperatures larger than some critical temperature Tc, \varphi is trapped near the origin, and excitations of \varphi about the origin form Dark Matter. After a phase transition at the temperature Tc, the trapping force disappears and \varphi rolls towards large field values. A homogenous component of \varphi appears and acts as Dark Energy. Within overdense regions, such as galaxies and galaxy clusters, the kinetic temperature is sufficiently high such that the phase transition does not occur. Thus, at the present time, \varphi can decribe both Dark Energy and Dark Matter.