  In this paper we carry out the steps of Darmon's program for the generalized
Fermat equation $$ x^p + y^p = z^5. $$ In particular, we develop the machinery
necessary to prove an optimal bound on the exponent $p$ for solutions
satisfying certain $2$-adic and $5$-adic conditions which are natural from the
point of view of the method. The above equation is an example of a generalized
Fermat equation for which higher dimensional Frey varieties are needed for the
modular method to work and thus represents an interesting test case for
Darmon's program.
