VISITORS arriving at Quito’s new airport are swept to Ecuador’s capital, 35km (22 miles) away, along a brand new six-lane motorway. Together with new hospitals, schools, social housing and benefits and student grants, the vastly improved road network is the work of President Rafael Correa’s “Citizens’ Revolution”. With his melange of technocratic modernisation and leftist populism, Mr Correa leads a strong and hitherto popular government that has lasted eight years in a country where none of his three predecessors completed their terms.

But now Mr Correa is running out of money and the citizens are starting to turn against him. In June, in the biggest of many protests, some 350,000 people took to the streets of the port city of Guayaquil to demonstrate against plans to impose punitive additional taxes on inheritances and gains from property transactions.

The protests came as the plunge in the oil price and the strength of the dollar—which Ecuador has used as its currency since 2000—have combined to halt economic growth. The economy contracted in the first quarter of this year compared with the previous one. Independent economists forecast either no growth or a mild contraction this year and next.

The government claims to be diversifying the economy away from the export of oil and bananas. “It takes time,” concedes Nathalie Cely, the minister of production. She points to investments in food processing and tourism, and soon-to-be-opened Chinese-built hydroelectric plants (which will cut fuel imports). But the driver of growth has been public, rather than private, investment. “If you stuff businesses with taxes…that produces a lack of confidence, an economic slowdown and companies don’t invest,” says Jaime Nebot, the mayor of Guayaquil, who organised the June protest.

Mr Correa used oil revenue and Chinese loans to erect a big state, which spent 44% of GDP in 2013 according to the IMF. The headache now is how to finance this. Despite two rounds of budget cuts there is still a shortfall of around $7.2 billion (or 7% of GDP) this year, according to Observatorio Fiscal, a watchdog.

While the stock of public debt is still low (at 30% of GDP) it is rising fast. Ecuador lacks not just its own currency but also a lender of last resort. External sources of finance are drying up. The government has issued $1.5 billion in foreign bonds this year, but at a steep interest rate of 10.5%. The administration has introduced regulations that would allow it to issue electronic money and Central Bank paper. That way lies Greece, warns Abelardo Pachano, a former banker. Printing a quasi-currency risks a run on the banks by savers who fear deposits would not be returned in dollars; the Central Bank has hard-currency reserves of only $4.6 billion. Mr Correa, seeming to recognise the danger, has been cautious in implementing these measures.

So Ecuador is facing a big and politically testing fiscal squeeze. Mr Correa is still relatively popular, and the opposition is divided. But he has lost the middle class and the cities. He is trying to change the constitution to allow his indefinite re-election, without a referendum. That will provoke further protests.

There is a dark, Putinesque side to the regime. It has split the leftist social movements that were its original allies. It has bullied the media into self-censorship. Many public contracts have been awarded without tender. Opponents claim that corruption is rampant. Those who make specific denunciations are persecuted by a new intelligence service and in pliant courts. At least two witnesses to corruption have died mysteriously.

Cléver Jiménez, a congressman for a left-wing party, was sentenced to 18 months in jail for accusing Mr Correa of responsibility for five deaths during a police mutiny in 2010. Martha Roldós, a centre-left politician who fell out with the president, was stripped of her political rights and says her daughter was twice threatened by gunmen. Guillermo Lasso, a conservative former banker whom Mr Correa defeated in the 2013 presidential election, says his phone is being tapped.

The president’s opponents doubt he will cede power voluntarily. “We appear to be living in a democracy, but all the institutions of state are subject to one person,” says Mr Jiménez. Mr Correa “can only conceive of being president, not an ex-president”, according to Mr Lasso.

Mr Correa faces a choice. He could persist in his bid for permanent power and risk being kicked out by the street, like his predecessors. Or he could swallow his pride, stabilise the economy and drop his re-election bid. He would then go down in history as one of Ecuador’s most successful presidents.