This paper examines the mechanisms through which government spending affects the dynamics of the real exchange rate. Using a two-sector dependent open economy model with intersectoral mobility costs for private capital, we show that public investment generates (i) a nonmonotonic U-shaped adjustment path for the real exchange rate with sharp intertemporal trade-offs and (ii) a crowding-in of private consumption, consistent with stylized facts. The effects of public consumption, however, are in sharp contrast to those of public investment. The effect of government spending on the real exchange rate depends critically on (i) the sectoral composition of public spending, (ii) the underlying financing policy, (iii) the sectoral intensity of private capital in production, (iv) the relative sectoral productivity of public infrastructure, (v) the elasticity of substitution in production, and (vi) intersectoral mobility costs for capital. In deriving these results, we identify conditions under which the predictions of the neoclassical open economy model can be reconciled with empirical regularities. Our results underscore the importance of decoupling the effects of government investment from those of government consumption in understanding the relationship between fiscal policy and the real exchange rate.