Mine-related transport infrastructure typically connects mines directly to the coast, a pat- tern that is most clearly seen in Africa. We estimate the effect of such infrastructure on the pattern of bilateral trade flows. We find that a standard deviation increase in the number of mines over the mean biases a country’s pattern of trade flows in favor of overseas trade, to the extent that these mining countries import 56% less from neighboring countries (relative to overseas countries), than do countries with an average number of mines. However, this effect is reversed for mining landlocked countries, who import relatively more from neighbors. We rationalize this finding through the unequal effect that mines have on a country’s network of infrastructure: because the mine-related transport infrastructure connects the coast rather than neighboring countries, it lowers the cost of trading with overseas countries more than with neighbors. In contrast, for landlocked countries trade costs are also lowered with some neighbors through which infrastructure is built to reach the coast. The effect is specific to mines and not to oil and gas fields, because pipelines cannot be used to trade other commodi- ties. The effect is robust to measuring the stock of mine-related infrastructure by distance along roads between mines and ports, and to taking into account their relative position to routes used for trade between ports and main cities. We discuss the welfare implications of our results for development, and relate these to the recent surge of Chinese infrastructure investment in Africa.