  We produce an integral model for the modular curve $X(Np^m)$ over the ring of
integers of a sufficiently ramified extension of $\mathbf{Z}_p$ whose special
fiber is a {\em semistable curve} in the sense that its only singularities are
normal crossings. This is done by constructing a semistable covering (in the
sense of Coleman) of the supersingular part of $X(Np^m)$, which is a union of
copies of a Lubin-Tate curve. In doing so we tie together nonabelian Lubin-Tate
theory to the representation-theoretic point of view afforded by
Bushnell-Kutzko types.
  For our analysis it was essential to work with the Lubin-Tate curve not at
level $p^m$ but rather at infinite level. We show that the infinite-level
Lubin-Tate space (in arbitrary dimension, over an arbitrary nonarchimedean
local field) has the structure of a perfectoid space, which is in many ways
simpler than the Lubin-Tate spaces of finite level.
