We describe the full nonlinear development of the superradiant instability for a charged massless scalar field coupled to general relativity and electromagnetism, in the vicinity of a Reissner-Nordström-anti-de Sitter black hole. The presence of the negative cosmological constant provides a natural context for considering perfectly reflecting boundary conditions and studying the dynamics as the scalar field interacts repeatedly with the black hole. At early times, small superradiant perturbations grow as expected from linearized studies. Backreaction then causes the black hole to lose charge and mass until the perturbation becomes nonsuperradiant, with the final state described by a stable hairy black hole. For large gauge coupling, the instability extracts a large amount of charge per unit mass, resulting in greater entropy increase. We discuss the implications of the observed behavior for the general problem of superradiance in black hole spacetimes.