Last week’s mega-rally by Muslim hardliners in Jakarta took a dramatic turn when Indonesian President Joko Widodo turned up to join the Friday prayers that ended the protest. The rally had brought together an estimated half a million people at the National Monument to demand the arrest of Jakarta Governor Basuki Tjahaja Purnama for allegedly having insulted Islam.

What is not known publicly is that the president decided to meet the demonstrators in spite of being told by Indonesian intelligence that he faced an imminent terror attack. Security forces had seized several grenades, a bomb and a Molotov cocktail at the demonstration.

According to a high-ranking official who spoke on condition of anonymity, Mr Joko was advised to avoid the rally. It was suggested that he could instead go for Friday prayers at the Masjid Istiqlal, the national mosque, in a conciliatory gesture to the crowds. But at the last minute, he told aides that he would face the demonstrators notwithstanding the threats.

He wanted to demonstrate his ability to take charge of events instead of being led along by them.

The rally – the largest of three protests spearheaded by the Islamic Defenders Front against the Chinese-Christian governor in as many months – had been infiltrated by terrorists. Other forces, too, were trying allegedly to take advantage of it, leading to the arrests of several people for subversion before the rally. More arrests will follow.

In spite of – or precisely because of – the gravity of the situation, the president disregarded warnings of his safety and attended prayers at the rally site. Accompanied by Vice-President Jusuf Kalla, he seized the initiative from the Muslim hardliners. His presence embodied the message that the state respected the right of dissent but would not tolerate protests being hijacked by anti-national forces.

This is not the first time that Mr Joko has displayed decisive leadership. There have been at least three other occasions.

The first was when, early into his presidency, he slashed fuel subsidies. Just around this time two years ago, he raised fuel prices by more than 30 per cent, saving the government around US$11.5 billion in subsidies, or 9 per cent of budgetary spending for the following year. Taking advantage of low oil prices globally, which made the subsidy cut less painful than it would have been otherwise, he moved against an ingrained habit of treating low fuel prices as a social entitlement although Indonesia is a net oil importer.

The second occasion when the president revealed the steel beneath his smiling visage was his visit to the Natuna Islands in June this year.

He held a limited Cabinet meeting on board a warship that had clashed with Chinese fishing vessels the previous week. His message to China was that the Natunas, including waters around them, were an indisputable part of Indonesian territory.

The third instance is the killing of Santoso, Indonesia’s most wanted terrorist, under his watch earlier this year.

Javanese statecraft

Mr Joko’s mindset distinguishes him sharply from his predecessor, the hapless Susilo Bambang Yudhoyono. The latter’s weak and indecisive governance for a whole decade allowed Indonesia to drift economically, politically and strategically.

Matters came to the point where a reassertion of presidential leadership became necessary for at least a measure of political credibility at home and national self-esteem abroad.

What the incumbent president is doing is to hark back to the iron years of President Suharto. Under that leader, Indonesia recovered from the lost era of the flamboyant but ineffectual President Sukarno, who failed ultimately to reconcile the divergent forces of nationalism, socialism and Islam.

Mr Suharto created a new centre of authority by presenting a platform for the peaceful contention of the forces of secular nationalism, inclusive capitalism and moderate Islam. He was not altogether successful altogether, partly because widespread corruption stymied his nation-building efforts.

However, he brought a new Indonesia into being. It was brutally authoritarian, but it also produced the social goods – economic growth, law and order, and an imaginative sense of national identity – that legitimised his New Order regime.

Mr Joko has to function in the very different conditions of an Indonesia where democratic norms and procedures have been consolidated since Mr Suharto’s fall in 1998. Also, unlike him, the current president is not a former general who enjoys the support of the most socially-extensive institution in Indonesia. Unlike his democratic predecessors, he is an outsider to the political system, not being the scion of a famous family or a bureaucrat whom destiny propelled from following policy faithfully to making it.

But he is persevering in spite of these challenges. He is hard-headed. In May 2015, he told me categorically he was confident that he would take control of Parliament by winning over key parties. He has done so.

Simultaneously, he is reverting to a leadership style that is in remarkable consonance with the Javanese statecraft that had underpinned Mr Suharto’s longevity in office. In Javanese political cosmology, a stable centre, once it is established in its legitimate power and deferential solemnity, draws the periphery into a durable order of things.

This mindset is very different from the Western insistence on the need for individuals to act collectively as a check against constitutional authority. The Javanese leadership style, into which Indonesian expectations of the presidency are inscribed, looks for checks and balances within that office, not from the outside.

For this political culture to work, the president must not be a creature of passing circumstances. He must be in control of them ultimately.

Following the Javanese dictum of alon alon asal kelakon – “slowly but surely” – Mr Joko is seeking to inherit a Javanese mantle which served Mr Suharto well.

Mr Joko has his weaknesses. One of them is his tendency to divide and rule, leading to some confusion in the Istana’s inner circle. He needs a stronger group of core advisers who will be able to implement his policies. In traditional Javanese style, the personnel and acts of the court should be able to radiate to the popular periphery the ruler’s power and influence.

Be that as it may, the country’s strongest leader since Mr Suharto has inaugurated a new presidential culture in democratic Indonesia. Born of will and determination, it is a culture that not even half a million demonstrators could shake.