This paper empirically and theoretically investigates the relationship between budget balances and external balances, the so-called twin deficit hypothesis. Using the US post-World War II data, I estimate a time-varying structural vector autoregressive model to evaluate the effects of structural breaks on this relationship. The empirical results reveal that the relationship is significantly time varying: (1) an increase in government spending and the consequent budget deficits tend to cause trade deficits in the Bretton Woods era; (2) in contrast, an increase in government spending tends to induce trade surpluses in the post-Bretton Woods era; and (3) with the exceptions of the 1980s and 2010s, government spending shocks cause trade deficits under a floating exchange regime. Using the open economy New Keynesian model with rule-of-thumb consumers, I find that a shift in exchange rate regimes helps in understanding empirical results (1) and (2). Moreover, slowly adjusted taxes inform our comprehension of exceptions in the 1980s, whereas zero lower bound aids our explanation of exceptions in the 2010s.