  We develop a variety of new techniques to treat Diophantine equations of the
shape $x^2+D =y^n$, based upon bounds for linear forms in $p$-adic and complex
logarithms, the modularity of Galois representations attached to
Frey-Hellegouarch elliptic curves, and machinery from Diophantine
approximation. We use these to explicitly determine the set of all coprime
integers $x$ and $y$, and $n \geq 3$, with the property that $y^n > x^2$ and
$x^2-y^n$ has no prime divisor exceeding $11$.
