Countries are increasingly turning to non-tariff barriers that are hard to measure and often illegal under WTO rules. What are the impacts of these policies, and what do they reveal about market power in international trade? We study a comprehensive system of discretionary import licenses imposed by Argentina, where we observe the universe of transaction-level requests and approval decisions between 2013 and 2015. Approvals varied across firms and products in a manner consistent with the government’s trade and investment objectives, and over time to safeguard the current account. Interacting these sources of variation to construct an instrument, we estimate that stricter restrictions increased the prices paid by importers, a result that runs counter to competitive price-setting behavior. Informed by a model and a classifier-Lasso, the price and quantity responses identify—for each combination of importer, narrow product, and origin—which side (importer or exporter) holds market power. We find that larger importers are more likely to hold market power, and those trading with richer countries are less likely to. The market-power distribution strongly shapes the effects of quantitative restrictions and the magnitude of optimal tariffs. Import prices rose by 4% as a result of Argentina’s import restrictions, but would have risen by 13% (fallen by 8%) had all foreign firms (Argentinian firms) held market power.