We study the impact of bank credit on firm productivity. We exploit a matched firm-bank database covering all the credit relationships of Italian corporations, together with a natural experiment, to measure idiosyncratic supply-side shocks to credit availability and to estimate a production model augmented with financial frictions. We find that a contraction in credit supply causes a reduction of firm TFP growth and also harms IT-adoption, innovation, exporting, and adoption of superior management practices, while a credit expansion has limited impact. Quantitatively, the credit contraction between 2007 and 2009 accounts for about a quarter of observed the decline in TFP.