We evaluate if lenders price or securitise mortgages to mitigate credit risk. Exploiting exogenous variation in regional credit risk created by differences in foreclosure law along US state borders, we find that financial institutions respond to the law in heterogeneous ways. In the agency market where Government Sponsored Enterprises (GSEs) provide implicit loan guarantees, lenders transfer credit risk using securitisation and do not price credit risk into mortgage contracts. In the non-agency market, where there is no such guarantee, lenders increase interest rates as they are unable to shift credit risk to loan purchasers. The results inform the debate about the design of loan guarantees, the common interest rate policy, and show that underpricing regional credit risk leads to an increase in the GSEs' debt holdings by $79.5 billion per annum, exposing taxpayers to preventable losses in the housing market.