Black markets can reduce the effects of distortionary regulations by reallocating scarce resources toward consumers who value them the most. The illegal nature of black markets, however, creates transaction costs that reduce the gains from trade. We take a partial identification approach to infer gains from trade and transaction costs in the black market for Beijing car license plates, which emerged following their recent rationing. Using comprehensive car sales data, we estimate a lower bound for the volume of unobserved black market trade under weak assumptions. We find that at least 11% of the quota of license plates is illegally traded. We infer gains from trade and transaction costs, and we tighten the bounds on the volume of trade under further assumptions on black market transactions. The estimated transaction costs suggest severe market frictions: between 61% and 82% of the realized gains from trade are lost to transaction costs, and the net gains from trades realized in the black market are between 7% and 28% of the potential gains from trade.