For all of Mr Duterte’s bravado and alleged extrajudicial killings of suspected criminals, he may not even make much of an impact on crime. The murder rate in Davao remains stubbornly high. Mr Duterte’s reputation for cleanness was challenged toward the end of the campaign, when Antonio Trillanes, an independent vice-presidential candidate, accused him of having millions of dollars stashed in secret bank accounts, running illegal protection rackets and hiring ghost employees. Mr Duterte denied the charges.

His anti-establishment campaign may also hamper him: having run against the political elite, he now must govern with them. In Mr Duterte many see echoes of Mr Estrada, another populist outsider elected on an anti-corruption platform. His presidency lasted just under 18 months: he was impeached for graft, and resigned after the army withdrew its support.

A similar future may lie in store for Mr Duterte. During the campaign some speculated that Mr Aquino’s Liberal Party (LP) machine would throw its support behind Ms Poe once it became clear that Mr Roxas could never win. Instead party grandees are rumoured to prefer impeachment, particularly if the LP candidate, Leni Robredo, wins the vice-presidency, and would become president on Mr Duterte’s departure. As The Economist went to press she had a narrow lead.

Many hoped the Philippines had outgrown such antics. When Mr Aquino steps down at the end of June, he will become the first president to enter office with clean hands and to leave the same way since Fidel Ramos in 1998. Unlike his two predecessors, Mr Aquino has faced no charges of impeachment (they succeeded against Mr Estrada, but not against Ms Arroyo) or coup attempts. Whatever one thinks of Mr Duterte, the country’s voters chose him and he deserves to take office with the wind, rather than schemers, at his back.

Thriller in Manila

A return to instability would do the Philippines no good. The country is not over-reliant on commodities or China. Unlike China, Japan and Thailand, the Philippines has a young population and a cheap English-speaking labour force. The country does not share Indonesia’s protectionist instincts and is more welcoming to foreign investors. If it keeps to today’s path it could become one of Asia’s stars.

All of that is at risk. In the short term Mr Duterte is unlikely to make any policy reversals to stop growth. But investors are nervous: Mr Aquino was dull but predictable; Mr Duterte is neither. Further ahead, the Philippines risks the same combination of political unpredictability and stagnation as Thailand—another country divided between a minority long accustomed to getting its way and a majority that keeps voting against it. If the Filipino elite understands the message voters have sent in electing Mr Duterte, they could avert this fate.

The bigger risk comes from the long-term damage a strongman could do to a young democracy’s still-fragile institutions. On the stump Mr Duterte mused about shutting down Congress and declaring a “revolutionary government” if he fails to get his way. His enthusiasm for vigilante killings shows his preference for order at the expense of law. The Philippines’ growing prosperity reflects the country’s improved governance, and the confidence of investors. Voters rightly want more inclusive growth and are frustrated at the domination of their country by a small number of families. But electing a president with contempt for the law and democratic norms will solve neither problem.