This paper develops a general equilibrium model of international trade with heterogeneous firms and imperfect credit markets. To finance the costs for product innovation and domestic and foreign market entry, firms must raise external capital. The model underscores the importance of considering a general equilibrium setting in order to characterize fully the misallocations of resources that stem from the existence of credit frictions. These have important implications for firms' entry decisions in the different markets and for the welfare effects of imperfect financial institutions. Allowing for liquidity-constrained firms and imperfect credit markets alters, and in some cases reverses, some of the main results from the literature on heterogeneous firms. In particular, the model predicts that trade liberalization does not necessarily lead to an increase in average productivity and consumers' welfare.