Current estimates offer a puzzling picture of the magnitude and historical evolution of the distance elasticity of trade. We take advantage of historical episodes that changed bilateral distance to estimate the distance elasticity in the time dimension and characterize its evolution over time. The openings of the Suez and Panama Canals -- as well as the closure of the Suez Canal from 1967 to 1975 -- allow us to control for unobserved time-invariant country pair characteristics in a gravity setting. Our estimates show that the impact of distance on trade remains particularly low, even if it has increased during the last half century. These results reconcile the distance elasticity of trade with its two components: the elasticity of trade to trade costs and the elasticity of trade costs to distance. In a second stage, we use these estimates to quantify the trade and welfare effects associated with the openings of the Suez and Panama Canals. We also perform the counterfactual exercise of closing the Panama Canal in 2012 to evaluate its current welfare effect.