We discuss optimal fiscal policy in open economies, using an open-economy version of a model used in the recent work by Lucas and Stokey. An optimal allocation smooths out the tax distortions associated with financing a given sequence of government consumption, and it also smooths out private consumption of goods and leisure by borrowing (lending) on the international capital market in periods with high (low) government consumption. The main question we ask is how the optimal policy can be made time-consistent, when usccessive governments reoptimize with respect to current and future tax rates, but most honor the government debt obligations. We show that this requires government debt of sufficiently rich maturity to be issued. First we treat a case with capital controls, where only the government can borrow and lend abroad. The there is a unique restructuring scheme for the domestic debt that is necessary to give succeeding governments incentives to continue following the optimal policy (here we interpret and extend Lucas and Stokey's results). For a small economy, this scheme is also sufficient for time-consistency, but in an economy large enough to affect its terms of trade, it is also necessary to follow a unique restructuring scheme for the government's (and the country's) foreign debt. When there are no capital controls, time-consistency is no longer a problem in a small economy. In a large economy, what matters is total government debt and total foreign debt (but not their composition), and again there are unique maturity structures necessary and sufficient for time-consistency. An interesting observation is that in the distorted world we consider, relaxing the capital controls actually deteriorates welfare