We study the impact of borrower protection on mortgage and housing demand. We focus on variation in the likelihood that a house is repossessed - conditional on the mortgage being in arrears and taken to court - coming from heterogeneity in preferences of judges that adjudicate on repossession cases in England and Wales. We develop a simple theoretical framework that shows that too much borrower protection restricts credit supply, while not enough restricts credit demand. Market outcomes depend on which side dominates. To test the predictions of our model, we exploit exogenous spatial variation in repossession risk created by the boundaries of courts' catchment areas. In our setting, housing market characteristics, borrower attributes and mortgage rates do not change discontinuously across these boundaries - allowing us to isolate the causal effects of borrower protection. We find that less borrower protection decreases both mortgage sizes and house prices. This pattern suggests that judges in our sample are too strict and that demand determines market outcomes. Furthermore, we find that our measure of borrower protection does not react to market conditions - causing frictions in credit and housing markets.