From India's southern neighbour comes a lesson in the unpredictability of democracy. Incumbent Mahinda Rajapaksa looked invincible just weeks before Sri Lanka's presidential election. He had won the island's long-festering civil war and revived its economy, and his three brothers helped him control the levers of power - one ran defence, another Parliament and a third the economy. Things changed quickly, though. At the very last minute, a long-term ally of Mr Rajapaksa and senior minister quit to run against him. In double-quick time, Maithripala Sirisena forged a coalition across several anti-Rajapaksa parties - including pro-Tamil elements as well as Sinhalese extremists - and ran an effective lightning campaign. Mr Sirisena eroded just enough Sinhala Buddhist support for the anti-Rajapaksa landslide from the minority Tamils and Muslims to push him into office. Mr Rajapaksa accepted defeat with becoming grace, underlining Sri Lanka's reputation for institutional strength. Mr Sirisena has his work cut out for him. He has powerful allies to placate. Former (and likely future) prime minister Ranil Wickremesinghe and former president Chandrika Kumaratunga will play major roles in the new dispensation. And his alliance, featuring as it does such wildly disparate parties, will have sharply differing views on such subjects as war crimes and devolution.
Mr Rajapaksa's last few years in office were marked by a worsening relationship between New Delhi and Colombo. The United Progressive Alliance government was hostage to the Dravida Munnetra Kazagham, which continually had to demonstrate an anti-Colombo line to its voters. This hampered New Delhi's realpolitik. Meanwhile, the People's Republic of China stood by, willing to enable Mr Rajapaksa at every point when India demurred. This is an old, familiar dynamic - in the Cold War, for example, each side appeased dictators for fear that if they didn't, the other side would. Mr Rajapaksa was not a dictator, but China's deep pockets and willingness to completely overlook the possibility of war crimes made it a desirable partner. China aided, first, in the military build-up that prefaced the Sri Lankan army's final push in the civil war. And, more recently, it has taken assertive steps to upgrade the Beijing-Colombo relationship. Its ships of war and submarines dock seemingly freely in the island's ports. It has promised vast infrastructure investments. But, as with Myanmar and other places where the People's Republic of China has put money into infrastructure, there are voices of dissent. Colombo's $1.5-billion dockside redevelopment, for example - part of a $4-billion promise delivered by President Xi Jinping on a recent visit - is now threatened. Indeed Mr Wickremesinghe said on the campaign trail that he would cancel it. Much resentment surrounds Chinese projects, for which mainly Chinese workers have been hired, and the costs of which are still being disputed.
So, certainly, Mr Rajapaksa's departure presents an opportunity for India. But it is not a return to status quo ante. China's presence remains, and its power and pockets remain. All that is gained is a moment in which India can once again attempt to demonstrate that it is willing to be Sri Lanka's primary ally. This will need it to step up to make investments in projects such as Hambantota port - and not run away from them, as it has done in the past.