The past two decades have witnessed many episodes of economic reform across the developing world. Although initiated with popular enthusiasm, sustaining and completing these reform packages has turned out to be much more difficult, with policymakers having to `walk the line' between success and failure. Economic reform has run into a political impasse, or even been reversed in a number of other countries, despite being successful. In this paper we develop a unified framework that allows us to analyze the dynamic interaction between the progress of economic reforms and their political sustainability, in a world with imperfect state capacity. In doing so, we throw light on the varied experience with the sustainability of reforms across the developing world, to address three issues. First, why is it that reforms that are proceeding successfully often run into a political impasse? Second, is it easier or more difficult to politically sustain economic reforms in countries where the fiscal capacity of the state is better? Are countries with better state capacity more or less likely to be able to overcome any political impasse? Third, we examine the relationship between ethnic polarization and the political sustainability of economic reforms. In doing so we ask: does ethnic discord intensify or mitigate the politics of economic reform?Dynamic framework of reforms, together with a 'citizen-candidate' model of politics. The main new feature in our framework is that both the implementation of the reform, as well as the resolution of uncertainty about the identity of winners and losers, is dynamic and revealed over time. The most crucial element of our framework is that we endogenize both the government's decision on the continuation of reforms and on redistribution, through a political equilibrium involving the winners and losers at each stage. First, we demonstrate that economic reforms that are proceeding successfully may run into a political impasse, with the reform's initial success having a negative impact on its political sustainability. Second, we demonstrate that greater state capacity to make compensatory transfers to those adversely affected by reform, need not always help the political sustainability of reform, but can also hinder it. Finally, we argue that in ethnically divided societies, economic reform may be completed not despite ethnic conflict, but because of it.