Sri Lankan President Maithripala Sirisena greets onlookers as he arrives to address the nation from outside the Buddhist Temple of the Tooth in the central town of Kandy on Sunday. Sri Lanka’s new government has accused toppled strongman Mahinda Rajapaksa of having tried to stage a coup after losing last week’s presidential election. (Ishara S. Kodikara/Agence France-Presse via Getty Images)

Sri Lanka went to the polls on Thursday in a historic election. For the first time since the island became independent in 1948, an incumbent president was voted out of office. Early Friday, bleary-eyed from a night spent flipping between news networks or frantically refreshing Twitter, Sri Lankans struggled to assimilate the news that President Mahinda Rajapaksa had conceded the race.

As stunned as everyone else in the capital city of Colombo, my own reaction was to pull up Timur Kuran’s 1991 article on the unpredictability of dramatic political shifts: “Now out of Never.” Neither a defeat nor a concession seemed likely, or even possible, in late November, when Rajapaksa called snap polls two full years ahead of schedule. The move was calculated to renew his mandate before a worsening economy began to eat into his electoral majority. With the main opposition United National Party (UNP) unable to produce a candidate more exciting than their unpopular longtime leader, Ranil Wickremasinghe, Rajapaksa expected to coast to an easy victory. His campaign strategy, as always, rested on reminding ethnic Sinhalese voters of his 2009 defeat of the separatist Liberation Tigers of Tamil Eelam (LTTE).

But two days after announcing the election, Rajapaksa, and nearly everyone else, got a shock. His health minister, Maithripala Sirisena, defected and announced his own candidacy, backed by the opposition. Over the course of the short campaign, Sirisena gathered a big-tent coalition of unlikely allies. Nearly every week brought news of another government minister or member of Parliament crossing to support the opposition.

Sirisena’s appeal was simple: He offered a return to non-Rajapaksa rule. At a pocket meeting on the final night of campaigning last Monday, Colombo residents clapped gleefully as a senior UNP politician explained how the Sirisena candidacy had been orchestrated, using satellite phones to escape the Rajapaksa regime’s oppressive surveillance.

Over the course of 10 years in power, Rajapaksa had undermined the institutions of South Asia’s oldest democracy, beefing up Sri Lanka’s already robust executive presidency. He also consolidated power in the hands of his family. One brother served as secretary of defense, a second the speaker of Parliament, a third a cabinet minister, and numerous sons and nephews were installed in positions of power. Potential opponents to the dynastic project were bought off or brutally silenced. Election Day fell on the sixthanniversary of the killing of well-known journalist Lasantha Wickrematunge, who accused the Rajapaksas of his killing in a chilling posthumous editorial. Independent media have since learned to self-censor.

The Supreme Court Chief Justice who ruled against Rajapaksa initiatives was impeached, hamstringing the judiciary. Civil society leaders who criticized the regime were publicly threatened with violence. And Sri Lanka’s notorious “white van” abductions escalated – the victims picked up by death squads in unmarked white vans, their tortured bodies found the next day or never seen again.

If the situation was bad for regime opponents within the majority-Sinhalese community under Rajapaksa rule, it was dire for Sri Lanka’s ethnic minorities. The government’s 2009 triumph over the LTTE insurgency came at an enormous cost to the Tamil population in the north of the country. A U.N. report found credible evidence of serious war crimes committed by government forces, resulting in the deaths of an estimated 40,000 noncombatants. But despite international pressure, the Rajapaksa regime categorically refused to investigate allegations of international crimes, insisting that the victory had been a “humanitarian operation” with zero civilian casualties. And the military remained heavily deployed in the north, ostensibly providing development, but also engaging in a massive surveillance effort and enabling what human rights groups describe as an effort to shift the region’s demographics by settling Sinhalese families in historically Tamil areas.

For Sri Lanka’s Muslim population, Rajapaksa’s rule meant tacit state support for militant Buddhist violence. In June 2014, the extremist monks’ group Bodu Bala Sena (Buddhist Power Force) incited devastating religious riots in the town of Aluthgama. Four people were killed and at least 10,000 were displaced. The regime’s response was to impose a media blackout and accuse those journalists who reported on the violence of fostering “disharmony.”

Both Muslim and Tamil parties opted to support Sirisena, even though he comes from the same Sinhalese Buddhist nationalist background as the Rajapaksas. For Muslims, the decision was relatively straightforward. With the Bodu Bala Sena supporting a continuation of the Rajapaksa rule, a Sirisena administration represented the prospect of real change. The decision was less clear-cut for the Tamils. On the core issues of demilitarization of the north and accountability for mass atrocities, Sirisena promised no improvement. He has committed explicitly to protecting the Rajapaksas from possible war crimes charges and is unlikely to cooperate with the current U.N. Human Rights Council investigation. But the prospect of rule-of-law improvements, including the abolition of the executive presidency, or perhaps simply of getting rid of Rajapaksa was enough for the Tamil National Alliance to throw its support to the opposition.

On Election Day, Colombo felt like a city holding its breath. Queues formed at the polling stations for the 7 a.m. start of voting, but by noon, the streets were empty. Residents had mobbed the grocery stores the night before, stocking up on rice and milk in case of election violence. But after a campaign marred by what the Center for Monitoring Election Violence called “unparalleled” misuse of state resources, voting proceeded in an unexpectedly calm and orderly fashion, helped by an election commissioner who took an unexpectedly hard-line stance on regime shenanigans. A remarkable 81.52 percent of those eligible turned out to vote. And heavy voting in the Tamil and Muslim communities helped the challenger win with 51.28 percent of the vote.

The first few days of Sirisena’s presidency have already brought change. By Saturday, long-blocked Web sites were suddenly viewable, surveillance of journalists had been officially discontinued, and political exiles had been invited home. Word spread that a reinstatement of impeached Supreme Court Justice Shirani Bandaranayake was in the works.

Despite the resonance of the title of “Now Out of Never,” with the sudden occurrence of seemingly impossible political change in Sri Lanka, Kuran’s account of unpredictable popular revolution is not a good analogy for what happened. This was top-down change, resulting from an elite split very similar to those described by O’Donnell and Schmitter in 1986. And like most pacted transitions, it appears that its success depended on the role of the security forces, who apparently refused to perpetrate a coup when requested to do so in the early hours of Friday.

Sri Lanka is a well-known case for those studying civil war, terrorism or diaspora politics. But its politics offers many more topics of interest to political scientists. Long-standing debates on the politics of language, education, and federalism should draw the attention of scholars of ethnic politics. For human rights scholars, the standoff with the international community over post-conflict justice (the subject of my own research), press freedom and protection of minorities illustrates how the effectiveness of rights pressure depends on domestic political context. For those who study grand strategy, it is a key battlefield in the struggle for regional dominance between China and India. And Thursday’s election earns it a place in the study of democratic transition.

Kate Cronin-Furman is a PhD candidate in political science at Columbia University.