Almost all known image reconstruction algorithms for photoacoustic and thermoacoustic tomography assume that the acoustic waves leave the region of interest after a finite time. This assumption is reasonable if the reflections from the detectors and surrounding surfaces can be neglected or filtered out (for example, by time-gating). However, when the object is surrounded by acoustically hard detector arrays, and/or by additional acoustic mirrors, the acoustic waves will undergo multiple reflections. (In the absence of absorption they would bounce around in such a reverberant cavity forever). This disallows the use of the existing free-space reconstruction techniques. This paper proposes a fast iterative reconstruction algorithm for measurements made at the walls of a rectangular reverberant cavity. We prove the convergence of the iterations under a certain sufficient condition, and demonstrate the effectiveness and efficiency of the algorithm in numerical simulations.