We discuss generic properties of classical and quantum theories of gravity with a scalar field which are revealed at the vicinity of the cosmological singularity. When the potential of the scalar field is exponential and unbounded from below, the general solution of the Einstein equations has quasi-isotropic asymptotics near the singularity instead of the usual anisotropic Belinskii - Khalatnikov - Lifshitz (BKL) asymptotics. Depending on the strength of scalar field potential, there exist two phases of quantum gravity with scalar field: one with essentially anisotropic behavior of field correlation functions near the cosmological singularity, and another with quasi-isotropic behavior. The ``phase transition between the two phases is interpreted as the condensation of gravitons.