We study the impact of international financial flows on credit allocation exploiting the early 2000s boom of capital inflows in Italy. Using detailed bank-firm matched data we compare the patterns of credit allocation of banks with different exposure to the shock. Exposed banks significantly expand lending to high productivity and low credit-constraint firms. Constrained but high productivity firms also benefit from the shock. These results hold using alternative measures of firm productivity and credit constraints or of bank exposure to the flows, and do not seem to be driven by concurrent changes in bank funding or by the sorting of borrowers and lenders. We also find that the patterns of credit allocation induced by capital inflows have a positive, albeit small, impact on aggregate TFP. These results show that international financial flows did not contribute to increase misallocation