We show that capital inflows are important drivers of domestic credit cycles using a firm-bank-loan level dataset for a representative emerging market. Instrumenting inflows by changes in global risk appetite (VIX), we find that a fall in VIX leads to a large decline in real borrowing rates and an expansion in credit supply. Estimates explain 40% of observed cyclical corporate credit growth. The OLS-elasticity of interest rates vis-à-vis capital inflows is smaller than the IV-elasticity. Banks with higher non- core funding offer relatively lower rates to low net worth firms, but do not extend more credit to them given collateral constraints.