We study the effect of mortgage prepayment penalties on borrowers' prepayments and delinquencies by exploiting a 2007 reform in Italy that reduced penalties on outstanding mortgages and banned penalties on newly-issued mortgages. Using a unique dataset of mortgages issued by a large Italian lender, we provide evidence that: 1) before the reform, mortgages issued to riskier borrowers included larger penalties; 2) higher prepayment penalties decreased borrowers' prepayments; and 3) higher prepayment penalties did not affect borrowers' delinquencies. Moreover, we find suggestive evidence that prepayment penalties affected mortgage pricing, as well as prepayments and delinquencies through borrowers' mortgage selection at origination, most notably for riskier borrowers.