Laws governing the foreclosure process can have direct consequences on the costs of foreclosure and could therefore affect lending decisions. We exploit the heterogeneity in the judicial requirements across U.S. states to examine their impact on banks' lending decisions in a sample of urban areas straddling state borders. A key feature of our study is the way it exploits an exogenous cutoff in loan eligibility to GSE guarantees which shift the burden of foreclosure costs onto the GSEs. We find that judicial requirements reduce the supply of credit only for jumbo loans that are ineligible for GSE guarantees. These laws do not affect, however, the relative demand of jumbo loans. Our findings, which also hold using novel nonbinary measures of judicial requirements, illustrate the consequences of foreclosure laws on the supply of mortgage credit. They also shed light on a significant indirect cross-subsidy by the GSEs to borrower-friendly states that has been overlooked thus far.