Brazil's 2005 bankruptcy law reform strengthened creditor protection, resulting in a substantial acceleration of credit expansion and business investment growth. In this paper, we go beyond average effects and examine to what extent the pro-creditor reform affected the allocation of resources across firms. We find evidence that the reform was particularly effective in alleviating credit constraints for high productivity firms. After the reform, better access to credit allowed these firms to thrive on the expense of others. Our results suggest that better access to credit can improve the allocation of resources across firms, thus raising aggregate productivity.