In the past three decades, governments in emerging markets have accumulated large amounts of international reserves, especially those with fixed exchange rates. We propose a theory of reserve accumulation that can account for these facts. Using a model of endogenous sovereign default with nominal rigidities, we show that the interaction between sovereign risk and aggregate demand amplification generates a macroeconomic-stabilization hedging role for international reserves. Reserves increase debt sustainability to such an extent that financing reserves with debt accumulation may not lead to increases in spreads. We also study simple and implementable rules for reserve accumulation. Our findings suggest that a simple linear rule linked to spreads can achieve significant welfare gains, while those rules currently used in policy studies of reserve adequacy can be counterproductive.