AS DARKNESS FELL on October 19th, General Javier Iturriaga, Chile’s head of national defence, declared the first curfew in Santiago, the capital, since the end of Augusto Pinochet’s military dictatorship 29 years ago. The order, which applied to Santiago and areas nearby, was a response to unrest that began weeks ago after a rise in metro fares. On the 18th and 19th rioters had set ablaze metro stations and buses, barricaded streets and clashed with police. Public-transport services were suspended. Protests spread to other cities; curfews were also declared in Valparaíso and Concepción. Chile’s president, Sebastián Piñera, suspended the fare increase. But neither his surrender nor the curfew has quelled the unrest. Supermarkets have been looted, and three people were killed by a fire in one on the night of the 19th.

The violence has stunned many Chileans. Their country is one of South America’s most prosperous and peaceful. Now it has suffered the sort of turmoil that recently occurred in Ecuador, a much poorer country, when its government raised fuel prices to comply with the terms of an IMF agreement. (It also relented.)

In Chile transport fares—covering buses and trains, as well as the metro in the capital—are set by a panel of experts, which considers such factors as diesel prices and the value of the peso. This technocratic approach to some areas of policymaking reflects Chile’s relative economic liberalism, which in turn has contributed to its relative economic prosperity. It is not always popular, as the reaction to the fare increase shows. On October 6th the transport panel raised peak-time tariffs on Santiago’s metro by 30 pesos (four American cents) to 830 pesos; rising diesel prices and a stronger dollar were cited in justification. The first sign of resistance was an outbreak of large-scale fare-dodging, which suddenly escalated into violence. (No known groups appear to be behind the unrest.)

The government’s response was inept. The day after the fares went up, the economy minister, Juan Andrés Fontaine, suggested that commuters get up earlier to avoid peak fares. Instead of listening to protesters’ grievances, it cracked down. On October 18th it expanded police powers to arrest and punish rioters under the state-security law, dating from 1958, extended under the dictatorship and amended since, which threatens prison for those who destroy public infrastructure, or incite its destruction. As protests continued, the government declared a state of emergency and deployed the army. This reminder of dictatorship widened support for the protests. Mr Piñera gave a divisive address telling Chileans to choose between violence and democracy; in a later speech he struck a different tone, distinguishing between peaceful and violent protesters.

Chileans are not just angry about transport tariffs. They pay a lot for health care and often wait long periods to see a doctor. Public education is poor. Pensions, managed by private firms under a system set up by the Pinochet regime, are low. Growing inequality sharpens the anger. In 2017 the income of the richest tenth of households was 39.1 times higher than that of the poorest decile, according to a survey by the social development ministry. That is up from 30.8 times in 2006. Half of Chileans earn less than 400,000 pesos a month. On top of all this came a fare rise in what is already one of South America’s most expensive cities. After the fare increase, transport can cost 32,000 pesos a month.

Many of these grievances pre-date the presidency of Mr Piñera, a centre-right businessman who began a second term in March last year. (His first was in 2010-14.) Chileans staged mass protests about the quality and cost of education in 2006 and 2011 and over pensions in 2016.

Mr Piñera has so far failed to notably boost the economy, one of his main campaign promises. It grew at an annual rate of just 1.9% in the second quarter of 2019. Lacking a majority in congress, Mr Piñera has been slow to enact major legislation on tax and pensions, making his government look ineffective.

He will now seek to repair both his own presidency and public confidence in government more broadly. Along with his climbdown on fares he has offered to set up a “dialogue table” including a cross-section of society about grievances such as the high cost of living. This may calm tempers, especially if opposition parties join his efforts at conciliation.

Chile is due to host two big international meetings: a summit of the leaders of the 21-country Asia-Pacific Economic Co-operation group in November and the UN’s annual climate-change summit the following month. In bidding to host such events Chile portrays itself as a bastion of stability in South America. Mr Piñera does not have much time to convince dignitaries that this is still true.