Using probabilistic methods, we first define Liouville quantum field theory on Riemann surfaces of genus g 2 and show that it is a conformal field theory. We use the partition function of Liouville quantum field theory to give a mathematical sense to Polyakov's partition function of noncritical bosonic string theory [Po] (also called 2d bosonic string theory) and to Liouville quantum gravity. More specifically, we show the convergence of Polyakov's partition function over the moduli space of Riemann surfaces in genus g 2 in the case of D 1 boson. This is done by performing a careful analysis of the behavior of the partition function at the boundary of moduli space. An essential feature of our approach is that it is probabilistic and non perturbative. The interest of our result is twofold. First, to the best of our knowledge, this is the first mathematical result about convergence of string theories. Second, our construction describes conjecturally the scaling limit of higher genus random planar maps weighted by Conformal Field Theories: we make precise conjectures about this statement at the end of the paper.(1.13)for some constant C, where the determinants are defined using spectral zeta functions, P g is a first-order elliptic operator mapping 1-forms to trace-free symmetric 2-tensors, and J g is the Gram matrix of a fixed basis of ker P * g (see Section 5.1 further details). Then Belavin-Knizhnik [BeKn] and Wolpert [Wo2] proved that the integral (1.12) with D = 26 diverges at the boundary of (the compactification of) moduli space, a problematic fact in order to establish well-posedness of the partition function for critical D = 26 (bosonic) strings.Noncritical string theories are not formulated within the critical dimension D = 26, yet they are Weyl invariant. The idea, emerging once again from the paper [Po], is that for D = 26 the integral (1.9) possesses one further degree of freedom to be integrated over corresponding to the Weyl factor e ω in (1.11). For D 1, hence c M 1, Polyakov argued that integrating this factor requires using Liouville quantum field theory. In other words, applying once again the 1 The term "critical" refers in fact to the critical dimension D = 26 needed to get a Weyl invariant theory without quantizing the Weyl factor e ω in (1.11).