We study the effects of federal purchases on firms' investment using a novel panel dataset that combines federal procurement contracts in the United States with key financial firm-level information. We find that 1 dollar of federal spending increases firms' capital investment by 7 to 11 cents. The average effect masks heterogeneity: Effects are stronger for firms that face financing constraints and they are close to 0 for unconstrained firms. In line with the financial accelerator model, our findings indicate that the effect of government purchases works through easing firms' access to external borrowing. Furthermore, industry-level analysis suggests that that the increase in investment at the firm level translates into an industry-wide effect without crowding-out capital investment of other firms in the same industry.