We show that the Wilsonian renormalization group (RG) provides a natural regularisation of the Quantum Master Equation such that to first order the BRST algebra closes on local functionals spanned by the eigenoperators with constant couplings. We then apply this to quantum gravity. Around the Gaussian fixed point, RG properties of the conformal factor of the metric allow the construction of a Hilbert space L of renormalizable interactions, nonperturbative in , and involving arbitrarily high powers of the gravitational fluctuations. We show that diffeomorphism invariance is violated for interactions that lie inside L, in the sense that only a trivial quantum BRST cohomology exists for interactions at first order in the couplings.However by taking a limit to the boundary of L, the couplings can be constrained to recover Newton's constant, and standard realisations of diffeomorphism invariance, whilst retaining renormalizability. The limits are sufficiently flexible to allow this also at higher orders. This leaves open a number of questions that should find their answer at second order. We develop much of the framework that will allow these calculations to be performed.At the classical, and strictly local, level, this question is addressed by the well developed subject of BRST cohomology [18][19][20][21][22] (for reviews see [23][24][25]), exploiting properties of the Batalin-Vilkovisky antibracket formalism [26][27][28][29] to ask simultaneously for consistent deformations of linearised diffeomorphism invariance and local actions that would realise it, whilst automatically taking into account all local reparametrisations. Under rather broad assumptions the answer is unique:General Relativity is the only solution [22]. (For earlier alternative approaches, see refs. [30][31][32][33][34][35][36][37][38][39].)What we require however is the generalisation of this question to the quantum case, appropriately regularised in a way that respects the Wilsonian RG properties of the operators. Thus first we need a consistent combination of the Wilsonian RG and Batalin-Vilkovisky framework.This has been addressed in refs. [40][41][42][43][44][45][46][47][48], and adapted and applied especially to QED and Yang-Mills theory. 3 However as reviewed in sec. 2.5 these formulations have drawbacks, because they either leave the Batalin-Vilkovisky measure term ∆ [26,27] unregularised when acting on local functionals, or destroy the locality of the BRST (and Koszul-Tate) transformations. This in turn would imply that the quantum BRST algebra cannot close on local functionals. It would thus force us to work even at first order in the 'deformation parameter' κ, with expansions to infinite order in derivatives.In sec. 2.4, we show however that this is not inevitable. There exists a particularly natural formulation that solves these problems. As we explain in sec. 2.6, at first order in κ it results in a regularised ∆ (when acting on arbitrary local functionals), but leaves the rest of the BRST structure unmodified. It thus allows us to inves...