  We prove the optimal global regularity of nonnegative solutions to the porous
medium equation in smooth bounded domains with the zero Dirichlet boundary
condition after certain waiting time $T^*$. More precisely, we show that
solutions are $C^{2,\alpha}(\overline\Omega)$ in space, with $\alpha=\frac1m$,
and $C^\infty$ in time (uniformly in $x\in \overline\Omega$), for $t>T^*$.
Furthermore, this allows us to refine the asymptotics of solutions for large
times, improving the best known results so far in two ways: we establish a
faster rate of convergence $O(t^{-1-\gamma})$, and we prove that the
convergence holds in the $C^{1,\alpha}(\overline\Omega)$ topology.
