Two key channels that allowed the 2007-2009 mortgage crisis to severely impact the real economy were: a housing net worth channel, as defined by Mian and Sufi (2014), which affected the wealth of leveraged households; and a bank net worth channel, which reduced the ability of financial intermediaries to provide credit. To capture these features of the Great Recession, I develop a DSGE model with balance-sheet constrained banks financing both risky mortgages and productive capital. Mortgages are provided to agents facing idiosyncratic housing depreciation risk, implying an endogenous default decision and a link between their borrowing capacity and house prices. The interaction among the housing net worth channel, the bank net worth channel and endogenous foreclosures generates novel amplification mechanisms. I analyze the quantitative implications of these new channels by considering two different shocks linked to the supply of mortgage credit: an increase in the variance of housing risk and a deterioration in the collateral value of mortgages for bank funding. Both shocks are able to produce co-movements in house prices, business investment, consumption and output. Finally, I study two types of policy interventions that are able to reduce the severity of a mortgage crisis: debt relief for borrowing households and central bank credit intermediation.