  We consider the equation $-\Delta_p u=f(u)$ in a smooth bounded domain of
$\mathbb{R}^n $, where $\Delta_p$ is the $p$-Laplace operator. Explicit
examples of unbounded stable energy solutions are known if $n\geq p+4p/(p-1)$.
Instead, when $n<p+4p/(p-1)$, stable solutions have been proved to be bounded
only in the radial case or under strong assumptions on $f$.
  In this article we solve a long-standing open problem: we prove an interior
$C^\alpha$ bound for stable solutions which holds for every nonnegative $f\in
C^1$ whenever $p\geq2$ and the optimal condition $n<p+4p/(p-1)$ holds. When
$p\in(1,2)$, we obtain the same result under the non-sharp assumption $n<5p$.
These interior estimates lead to the boundedness of stable and extremal
solutions to the associated Dirichlet problem when the domain is strictly
convex.
  Our work extends to the $p$-Laplacian some of the recent results of Figalli,
Ros-Oton, Serra, and the first author for the classical Laplacian, which have
established the regularity of stable solutions when $p=2$ in the optimal range
$n<10$.
