We derive the low-energy effective theory of gravity for a generalized Randall-Sundrum scenario, allowing for a third self-gravitating brane to live in the 5D bulk spacetime. At zero order the 5D spacetime is composed of two slices of anti-de Sitter spacetime, each with a different curvature scale, and the 5D Weyl tensor vanishes. Two boundary branes are at the fixed points of the orbifold whereas the third brane is free to move in the bulk. At first order, the third brane breaks the otherwise continuous evolution of the projection of the Weyl tensor normal to the branes. We derive a junction condition for the projected Weyl tensor across the bulk brane, and combining this constraint with the junction condition for the extrinsic curvature tensor, allows us to derive the first-order field equations on the middle brane. The effective theory is a generalized Brans-Dicke theory with two scalar fields. This is conformally equivalent to Einstein gravity and two scalar fields, minimally coupled to the geometry, but nonminimally coupled to matter on the three branes.