When Joko "Jokowi" Widodo takes his oath of office as Indonesia's seventh president on Oct. 20, it will be a testament to the peaceful and orderly succession of the country's leadership. It will also be a testament to the fact that electoral democracy works.
This, more than anything, is probably the most important legacy, yet underappreciated, of ex-President Susilo Bambang Yudhoyono's 10 years as Indonesia's president.
Many people writing about SBY's legacy have had unkind words for him for missing many opportunities to take Indonesia to the next level of democracy.
As the first Indonesian president to be directly elected by the people, the nation put a lot of expectations on his shoulders when he came to power in 2004 and even more in 2009 after his re-election.
He did not live up to those expectations. Some argue that Indonesia has hardly advanced and others suggest that democracy has even regressed in the past decade.
But for all SBY's flaws and failures, no one can deny that Indonesia has a functioning democracy that has delivered a successor chosen by the people through open and fair elections.
Past presidential successions in Indonesia have never been this peaceful or orderly.
Sukarno, the first president since 1945, stepped down virtually at gunpoint in 1966 amid popular unrest and mass-scale murders around the country.
Soeharto ruled for the next three decades before he was brought down in 1998 by a people's power movement sparked by the deaths of four students that trigger bloody riots in Jakarta.
If the first two successions were messy and bloody, the next three were peaceful but hardly orderly.
BJ Habibie served as president briefly before the People's Consultative Assembly (MPR) rejected his accountability speech in 1999 and hence his chance to stay at the helm.
Abdurrahman "Gus Dur" Wahid was impeached by the MPR in 2001. Megawati Soekarnoputri, who lost her re-election bid to Yudhoyono when the direct election system was introduced in 2004, never conceded defeat and left the transition process messy.
This time, Yudhoyono will preside over what must go down as the most peaceful and orderly transition of the national leadership: a first for Indonesia. He has already promised Jokowi his full cooperation to ensure a smooth transition of power.
Although he may have missed some golden opportunities, Yudhoyono should still go down in history as the person who has kept the nation's torch of democracy alive.
And if we for a moment put aside our high expectations of him and look around the world, we would appreciate even more how under his leadership, Indonesia stands out in the region and among emerging democracies and emerging market economies.
Considering what is happening in many other parts of the world, the last 10 years have not been all that bad for Indonesia. Democracy has helped ensure not only political stability, but also economic progress that has put Indonesia firmly among the 20 largest economies in the world.
Sure, he could have done much better, but the reverse is also true. He could have done what other leaders did to their country: he could have made a mess of it. But he did not.
One only needs to look at Thailand, where the military is now back in charge because democracy failed to produce the right leaders from among the civilians.
And what about Egypt, which only had one democratic election after the Arab Spring in 2011 before the army retook power?
Indonesia has avoided being one of the many horror stories of democracy going horribly wrong.
There were moments when democracy looked like it was failing in Indonesia. But today, Indonesia has a functioning democracy. It is not perfect by any measure, but it is working and good enough to ensure a peaceful and orderly transition.
Yudhoyono made a big blunder in the last hour of his presidency by allowing the House of Representatives to abolish the direct elections mechanism for selecting leaders at provincial and regency levels last month. He could have prevented it there and then.
But upon realizing how unpopular this ruling was, he made amends by using his prerogative power to overrule the change. For now, at least, direct elections for local governments remain.
Granted for some, life has not greatly improved under Yudhoyono.
Some religious minorities would argue that their right to freedom of religion has not been protected; Papua remains an anomaly, an exception to the rule on issues of human rights and freedoms; the poorest of the poor would say that they have been left out of economic prosperity altogether; and the gap between the rich and the poor has widened.
But these and many others will be the challenges facing president Jokowi as he takes over the helm this week. Now we can all burden the new president with our even higher expectations.
Presidents are human beings. They all have their flaws and they can only deliver so much.
We are never short of speculation and theories about why Yudhoyono did not live up to expectations and why he missed out on many opportunities.
Only he knows the answer, and this is something we should all look forward to read if and when he publishes his memoirs.
So thank you, SBY. You have kept democracy intact and that means a lot for this nation.