Indonesian democracy experienced a near miss in 2014, when Jakarta governor Joko Widodo (Jokowi) defeated former general Prabowo Subianto by a margin of 6.3% in the presidential election. Both candidates were populists who rose to prominence in the context of public disillusionment with incumbent president Yudhoyono; Prabowo, however, condemned Indonesia's democratic system and promised to take Indonesia in a more authoritarian direction. We trace democracy's close call through five phases: the dying months of Yudhoyono's presidency, the rise of populist alternatives, the parliamentary elections of April 2014, the July presidential campaign, and the aftermath. We attribute the strength of Prabowo's campaign to superior organisational and financial support, while Jokowi's victory rested upon strong identification with him among poor and rural voters. Also determining the outcome was the fact that public satisfaction with democracy remained strong, undermining the effectiveness of Prabowo's authoritarian-populist message. Nevertheless, democracy's future remains uncertain, given that Prabowo and his supporters now control a sufficiently large number of parliamentary seats to continue promoting a rollback of democratic reforms.