  We study the long time existence of solutions to nonlinear wave equations
with power-type nonlinearity (of order $p$) and small data, on a large class of
$(1+n)$-dimensional nonstationary asymptotically flat backgrounds, which
include the Schwarzschild and Kerr black hole space-times. Under the assumption
that uniform energy bounds and a weak form of local energy estimates hold
forward in time, we give lower bounds of the lifespan when $n=3, 4$ and $p$ is
not bigger than the critical one. The lower bounds for three dimensional
subcritical and four dimensional critical cases are sharp in general. For the
most delicate three dimensional critical case, we obtain the first existence
result up to $\exp(c\epsilon^{-2\sqrt{2}})$, for many space-times including the
nontrapping exterior domain, nontrapping asymptotically Euclidean space and
Schwarzschild space-time.
