Through the lens of credit risk ratings, we investigate how banks determine loan terms under capital constraints. Using a unique and comprehensive supervisory dataset of individual corporate loans in the US, we show that unexpected adjustments to banks' internal rating systems, which only alter...