Most capital inflows are intermediated by domestic banks. We use transaction-level data on bank credit to estimate the causal impact of capital inflows on lending. The key mechanism is a failure of UIP, where capital inflows due to increases in global risk-appetite lead domestic banks to lower borrowing rates. Our estimates explain 43% of observed credit growth, where bank heterogeneity is critical for the aggregate impact. Foreign banks, exchange-rate driven balance-sheet shocks, and the relaxation of firm-level collateral constraints cannot account for our large estimates. Textbook- models, where UIP holds and capital flows are endogenous to demand cannot explain our findings.