In the last two decades, fiscal sustainability has been tested through the use of non-stationary time series analysis. Two different approximations can be found in the literature: first, a univariate approach that has focused on the stochastic properties of the stock of debt and, second, a multivariate one that has focused on the long‐run properties of the flows of expenditures and revenues, i.e., in the stochastic properties of the deficit. In this paper we unify these approaches considering the stock–flow system that fiscal variables configure. Our approach involves working in an I(2) stochastic processes framework. Given the possibility of the existence of regime shifts in the sustainability of US deficit that the literature has pointed out, we develop a new statistic that can be applied to test several types of I(2) cointegration and multicointegration relationships allowing for regime shifts. To test for these kinds of changing long‐run relationships we propose the use of a residual‐based Dickey–Fuller class of statistic that accounts for one structural break. We show that consistent estimates of the break fraction can be obtained through the minimization of the sum of squared residuals when there is I(2) cointegration. The finite sample performance of the proposed statistic is investigated by Monte Carlo simulations. The econometric methodology is applied to assess whether the US fiscal deficit and debt are sustainable. Copyright (C) 2010 John Wiley & Sons, Ltd.