Abstract We analyze the impact of corruption on bilateral trade, highlighting its dual role in terms of extortion and evasion. Corruption taxes trade, when corrupt customs officials in the importing country extort bribes from exporters (extortion effect), however, with high tariffs, corruption may be trade enhancing when corrupt officials allow exporters to evade tariff barriers (evasion effect). We derive and estimate a corruption-augmented gravity model, where the effect of corruption on trade flows is ambiguous and contingent on tariffs. Empirically, corruption taxes trade in the majority of cases, but in high-tariff environments (covering 5% to 14% of the observations) their marginal effect is trade enhancing.