A model of mortgage defaults is built into the standard incomplete markets model. Households face income and house-price shocks and purchase houses using long-term mortgages. Interest rates on mortgages are determined in equilibrium according to the risk of default. The model accounts for the observed patterns of housing consumption, mortgage borrowing, and defaults. Default-prevention policies are evaluated. The mortgage default rate, housing demand, households' ability to self-insure, and welfare are hump-shaped in the degree of recourse (the level of defaulters' wealth that can be garnished). Two forces affect default. More recourse implies that the punishment for default is harsher; this reduces the default rate. But more recourse also decreases the interest rates offered; this increases borrowing and the default rate. Introducing loan-to-value (LTV) limits for new mortgages contains borrowing, lowering the default rate with negligible negative effects on housing demand. The combination of recourse mortgages and LTV limits reduces the default rate while boosting housing demand. The behavior of economies with alternative prudential regulations is evaluated during a boom-bust episode in aggregate house prices. In the economy with both recourse mortgages and LTV limits, the mortgage default rate is less sensible to fluctuations in aggregate house prices.