How does the quality of national institutions that enforce the rule of law influence international trade? Anderson and Marcouiller argue that bad institutions located in the importer's country deter international trade because they enable economic predators to steal and extort rents at the importer's border. We complement this research and show how good institutions located in the exporter's country enhance international trade, in particular, trade in complex products whose characteristics are difficult to fully specify in a contract. We argue that both exporter and importer institutions affect international as well as domestic transaction costs in complex and simple product markets. International transaction costs are a part of the costs of trade. Domestic transaction costs affect complex and simple products differently, thereby changing a country's comparative advantage in producing such goods.We find ample empirical evidence for these predictions: countries that have good institutions tend to export more complex products and import more simple products. Furthermore, institutions have a stronger influence on trade via production costs (comparative advantage) than through international transactions costs. International institutions seem to operate as substitutes for domestic institutions, because good domestic institutions are less important for promoting exports in those countries that have signed the New York Convention.