We develop a small, open economy, two-sector model with heterogeneous agents and endogenous participation in a labor matching market. There are two types of agents: workers and entrepreneurs. Both populations are heterogeneous. Workers are distinguished by their potential ability as skilled workers and entrepreneurs by their potential ability to manage a firm. To capture the notion of decentralized labor markets we assume random matching. Those agents on the long side of the market who are not matched find employment in the unskilled sector as do those agents who decided not to attempt to enter the matching market. The output of matched pairs is a function of the two partners’ abilities. We find that disparities in labor institutions become a source of comparative advantage. The exact patterns will depend not only on the costs of entering the skilled sector but also on the mechanism used for dividing the surplus. We analyze the implications of asymmetric market entry costs for the patterns of international trade and underemployment. We find that if labor market inefficiencies are sufficiently strong trade liberalization can lead to welfare losses. We also examine the robustness of our results when we allow for complementarities in the production function and for alternative matching mechanisms.