The authors propose a firm dynamics model where firms face capital market imperfections and costs of operating in the formal sector. Formal firms have a larger set of production opportunities and the ability to employ skilled workers, but informal firms can avoid the costs of formalization. These firm-level distortions give rise to endogenous formal and informal sectors and, more importantly, affect the demand for skilled workers. The model predicts that countries with a low degree of debt enforcement and high costs of formalization are characterized by relatively lower stocks of skilled workers, larger informal sectors, low allocative efficiency, and measured TFP. Moreover, the authors find that the interaction between entry costs and financial frictions (as opposed to the sum of their individual effects) is the main driver of these differences. This complementarity effect derives from the introduction of skilled workers, which prevents firms from substituting labor for capital and in turn moves them closer to the financial constraint.