It might seem misleading to compare recent elections in Thailand and Indonesia. The two countries appear to be on divergent trajectories: Thailand, under military rule, on a path toward a bridled democracy; Indonesia an established if rambunctious democracy after four direct presidential elections.
Both polls were run remarkably well in the circumstances. When Thais voted at the end of March there had not been an election since 2014. Opposition parties were severely handicapped by a restrictive constitution drafted under the supervision of a military junta. Yet 66% of the 52 million strong electorate turned out to vote peacefully. Young people showed a particular enthusiasm for the ballot box.
In Indonesia, elections held in mid-April seemed like a daunting challenge: 193 million people cast votes for the presidency and a quarter of a million legislators at the central, provincial and district levels --all in the space of a morning, as the polls closed at lunchtime. But turnout exceeded 80% and both campaigning and voting passed off peacefully, despite a tragic loss of life among exhausted and poorly-trained election officials.
In both cases, the campaigns exploited inflammatory issues, stirring up tensions in society and poisoning post-election politics. The lesson is that even when events go well on polling day, what comes before and after matters hugely -- and needs attention.
In Thailand, as expected, the results show a country still riven by a deep divide between conservative and populist forces. The rift reflects a profound disconnection based on severe disparities of income and opportunity between the prosperous central provinces, which voted more for the conservative pro-junta party and its affiliates, and poorer rural areas of the North and Northeast, which voted more for Pheu Thai, the party of former Prime Minister Thaksin Shinawatra and its affiliates.
In Indonesia, President Joko Widodo, won by a convincing 11-point margin, as confirmed by official results in late May. Surprising was the social divide that voting patterns revealed. Widodo won comfortably in parts of the country that share a more tolerant approach to ethnicity and religious identity; his opponent, Prabowo Subianto, won similarly extensive backing in areas where there is growing support for more exclusive and intolerant aspects of Islamic identity.
Both these divides are stark and potentially destabilizing. To address them, ruling elites seem to be willing to consider the wrong remedies -- harsh, authoritarian approaches that threaten to erode democratic reforms.
In Thailand, the military junta has backed efforts to disqualify opposition parties that did surprisingly well, such as the Future Forward Party led by Thanathorn Juangroongruangkit, a telegenic young billionaire. The Thaksin-linked Pheu Thai, which won the largest number of directly-elected constituency seats in parliament, has cried foul over the election commission's decision not to award it any party list seats, although the pro-junta party, which won fewer constituency seats, was allocated lots. Pheu Thai called this an "an intentional abuse of the law and against the constitution."
In Indonesia, a fierce row has erupted between the two candidates' camps over the final tally. Prabowo alleged widespread voter fraud and cheating, and claimed he won 62% of the vote. His supporters have threatened to take to the streets, prompting security officials to declare that unconstitutional acts will not be tolerated and mulling treason charges against opposition figures.
Tough special measures have been prepared to deal with street protests, including wide-ranging legal means to arrest protesters and the army mounted a show of force on the streets of Jakarta. Popular opinion seems to back harsh security measures to prevent a challenge to the election, even if it means dusting off tools last used in 1998, before the introduction of democracy.
The pattern that emerges in both countries is one of modern elections that proceed peacefully and swiftly, aided by new technology. It is harder for political parties to cheat, although some are accused of doing so. And there has been an increase in the efficiency of monitoring.
But, even so, political leaders are interpreting the results in divisive ways. Modern ballot-box technology is not preventing old-fashioned political tactics that verge on trying to undermine the verdict. While discrediting democracy may not be the intention, it may well be the result.
In part this is because, as competitive politics gains traction, politicians are using latent social divisions to fish for votes. Given the chance, politicians will resort to identity politics as a basis for winning votes; this in turn tugs at the strings of jingoism and racism, which lie just below the surface, generating tension and often violence. Afterward, people clamor for order and stability, putting states on the slippery slope to authoritarian rule.
Social media also plays a role, as in other parts of the world, in mobilizing divisive forms of popular sentiment that fans the flames of ethnic and religious schisms.
But it is politicians who are mostly to blame. Southeast Asian societies, although polarized by socioeconomic inequalities and a general rise in religiosity, are at the same time reasonably self-regulating, unless mobilized to be otherwise. Campaigning in the recent Indonesian election clearly fed hungrily on questions of Islamic identity, just as the idea that populism is tantamount to republicanism lurked in the background of the Thai election campaign.
If democracy is to survive, competitive politics needs more regulation. Safeguards are required to prevent elections from destabilizing one of the world's most diverse regions.
Campaign rules need overhauling to possibly restrict inflammatory language, whilst not compromising the free speech that is essential to democracy.
In Indonesia's recent elections, both sides shamelessly embraced symbols of religious identity -- Widodo going so far as to appoint an elderly Muslim cleric as his running mate. It might help to bar candidates from using religion as a basis for campaigning. Campaign rallies that use symbols of exclusive religious identity -- such as the final rally of the Prabowo campaign in Jakarta last month -- should perhaps be subject to carefully crafted regulations guarding against hate speech.
Social media is a challenging area for regulation, but there is already a widespread call for curbing hate speech across the region, which major platforms such as Facebook are trying to address. In Thailand, media outlets have used collective consultation to address the erosion of impartiality and professional standards of reporting, with the help of civil society.
Stronger, more independent election commissions less subject to political interference would also make it easier for political actors to accept the verdict of the polls. Much of the tension in Thailand and Indonesia was generated by suspicion of wrongly tallied votes and delayed final results, inviting suspicion of interference.
For now, most of the regulation of elections is aimed at preserving public order. But in truth, electorates are normally better behaved than the politicians, and who are going to more and more extreme lengths to secure votes.
Michael Vatikiotis is the author of "Blood and Silk: Power and Conflict in Modern Southeast Asia"