The world economy has become more and more globalized as firms have organized production along global value chains. But more recently, globalization has stalled. This paper shows that higher uncertainty, in combination with better automation technologies, has likely contributed to that trend reversal. We show that plausibly exogenous exposure to uncertainty in developing countries leads to reshoring to high-income countries, but only if industrial robots have made this economically feasible. In contrast, we find no strong evidence of nearshoring or diversification. We address concerns about reverse causality by showing that results hold when using two alternative identification strategies. In a narrative approach, we use only locally generated spikes in uncertainty, for which the narrative around the events suggest that they are plausibly exogenous. In a small open economy approach, we restrict the sample to small developed countries that are unlikely to cause uncertainty in the developing world. Moreover, we show that results are robust to the main threats to identification related to shift-share instruments.