F OR DECADES economists wondered why the Philippines was doing so badly compared with its less gifted, more tigerish neighbours. In recent years, they have wondered how it was doing so well. The economy has grown briskly, without intolerable inflation or too much borrowing from abroad. And it has done so despite stagnant investment, lousy infrastructure and a narrow manufacturing base. Economists have long urged it to “walk on two legs”, expanding industry rather than placing all its weight on services. Instead it has kept hopping—but with impressive speed and balance.

Now, however, that balance is at risk. Inflation hit 6.7% in September, close to its highest rate in a decade and far above the central bank’s target of 2-4%. The current-account balance (which remained in surplus for 13 years in a row, thanks to strong remittances from emigrant cleaners, carers, nurses and the like) posted a narrow deficit in 2016 that has grown since. The stockmarket has lost over a fifth of its value since its January peak. And though growth remains impressive by international standards (6.1% in the third quarter, compared with a year earlier), it is at a three-year low. The government is seeking to get the economy back on track ahead of mid-term elections in May. The popularity of the president, Rodrigo Duterte, depends on it.

It is tempting to blame the country’s economic wobble on its volatile and reckless leader. Mr Duterte has, after all, destabilised much else in the Philippines. With his encouragement, police and vigilantes have slaughtered drug-dealers and addicts with impunity. When he became president in 2016, business types were spooked. But Mr Duterte’s iron fist is not chiefly to blame for the country’s economic trouble. International investors have largely turned a blind eye to his excesses. For them his bloody focus on crime has had a welcome side-effect: economic matters have been left largely to well-trained technocrats.

It is these technocrats, however, who bear some of the responsibility for the country’s current pickle. They have strived to find a second leg for the economy, beyond services. That has contributed to the country’s momentary loss of poise.

They recognise, rightly, that the Philippines lacks the infrastructure needed to attract export-oriented manufacturing. Years of underinvestment have left ports congested, airports overcrowded and cities choked with traffic. To help diversify the economy away from services, the government has embarked on an ambitious infrastructure drive. Dubbed “Build, build, build”, it aims to raise spending on roads, bridges, railways and ports from less than 5% of GDP to more than 7% by 2022.

To make room for this extra spending, the technocrats began a series of tax reforms. The first lifted the income-tax threshold and raised the top rate from 30% to 35%, as well as increasing consumption taxes on a range of goods, including petrol and sugar. But the early signs are that revenues will fall short of what was hoped for, says Ramon Clarete, an economist at the University of the Philippines Diliman. And the government’s loss of popularity means that further reforms, planned for corporate, property and mining taxes, may be postponed or even abandoned.

As a result, the economy has started to live beyond its means, with national spending exceeding production, imports increasing and prices rising. In principle, it makes sense for a developing country to borrow from abroad to invest in infrastructure that will eventually improve productivity and diversify exports. But with interest rates rising in America and contagion spreading across emerging markets, the Philippines has chosen a bad time to become a deficit country, relying on capital inflows to sustain its economic ambitions.

Meanwhile inflationary pressure continues to build, build, build. The problem has been exacerbated by policy blunders that have caused the cost of rice to soar. The Philippines is the only country in the world that limits the volume of rice imports. An agreement at the World Trade Organisation that permitted those restrictions for more than two decades expired last year. Rather than seize an opportunity to use cheap imports to keep prices down, Congress has tarried for months over a planned liberalisation. Meanwhile the National Food Authority ( NFA ), a government agency that oversees rice imports and is supposed to ensure the stability of food prices, has delayed rice imports at the border.

More expensive food, especially rice, is hardest on the poorest Filipinos. According to a government survey in 2015, the poorest fifth of households spend 20% of their total budgets on rice; the richest fifth spend just 5%. Higher food bills further fuel inflation by pushing up wage settlements: Manila’s minimum wage is due to rise by 4.9% to 537 pesos ($10) a day.

In recent weeks Mr Duterte has harangued food-hoarders and smugglers for pushing up prices—though they are incentivised by the current corrupt system, under which the NFA doles out import licences and acts as both regulator and market participant. More to the point, he has ordered the NFA to ease limits on food imports, lift non-tariff barriers and allow private traders to bring in more rice. Meanwhile, the central bank has also sought to tamp down price pressures. This week it raised its benchmark interest rate to 4.75%, up from 3% at the beginning of 2018.

To woo newly nervous foreign investors, Mr Duterte has eased some limits on inward investment. Firms with up to 40% foreign ownership can now bid to work on locally funded infrastructure. The previous limit was 25%. And he has continued to court aid and investment from foreign governments. In particular, since taking office he has cosied up to China, saying little about the two countries’ rival territorial claims in the South China Sea. In return, China has promised $9bn in infrastructure investment. But few of these promises have been fulfilled. Projects have been delayed by technical constraints, uncertainty over their viability and a lack of corporate interest. Of the $9bn pledged, only one irrigation project and two bridges, worth less than $200m in total, have broken ground. Mr Duterte must hope that a visit this week by China’s president, Xi Jinping, will help unlock funds.

The economy of the Philippines does not yet walk on two legs. But, by curbing inflation and courting foreign capital, the government is at least fighting the current bout of instability with two fists.