Of the different types of government outlays, since the 2000s public investment has been the main variable of adjustment during recessions in advanced and emerging economies. These contractions (expansions) have been associated with relatively medium-high (low) sovereign spreads, especially in advanced economies. To rationalize these issues, we develop a model of fiscal policy and sovereign default, with corporate default risk. Policymakers must decide between the provision of an unproductive public good and public investment, weighting their respective net benefits in terms of short-term stabilization and debt sustainability. In our model, investment follows a countercyclical stance only in the case of low levels of debt and moderate negative shocks, and otherwise contracts during recessions. The policy stance, along with the mix between different outlays, is determined by how sovereign risk responds to adverse economic shocks.