In a dynamic model of moral hazard, competition can undermine prudent bank behavior. While capital-requirement regulation can induce prudent behavior, the policy yields Pareto-inefficient outcomes. Capital requirements reduce gambling incentives by putting bank equity at risk. However, they also have a perverse effect of harming banks' franchise values, thus encouraging gambling. Pareto-efficient outcomes can be achieved by adding deposit-rate controls as a regulatory instrument, since they facilitate prudent investment by increasing franchise values. Even if deposit-rate ceilings are not binding on the equilibrium path, they may be useful in deterring gambling off the equilibrium path.