We analyze the effects of trade barriers using highly disaggregated data. The level of disaggregation allows us to separate the effects of tariffs and nontariff barriers (NTBs) into reduction, diversion, and compression effects. We find that multilateral tariffs significantly reduce trade flows and that trade preferences have a significant diverting effect. We also find that higher multilateral tariffs tend to shift trade towards larger exporters, suggesting that the desire to minimize fixed costs associated with trading dominates any preference for variety. In the case of NTBs, we find that, as often as not, the imposition of an NTB leads to an increase in the value of trade; in industries with low import demand elasticities, the influence of rising prices outweighs the decline in quantity.