FOR as long as most people can remember, food has been getting cheaper and farming has been in decline. In 1974-2005 food prices on world markets fell by three-quarters in real terms. Food today is so cheap that the West is battling gluttony even as it scrapes piles of half-eaten leftovers into the bin.

That is why this year's price rise has been so extraordinary. Since the spring, wheat prices have doubled and almost every crop under the sun—maize, milk, oilseeds, you name it—is at or near a peak in nominal terms. The Economist's food-price index is higher today than at any time since it was created in 1845 (see chart). Even in real terms, prices have jumped by 75% since 2005. No doubt farmers will meet higher prices with investment and more production, but dearer food is likely to persist for years (see article). That is because “agflation” is underpinned by long-running changes in diet that accompany the growing wealth of emerging economies—the Chinese consumer who ate 20kg (44lb) of meat in 1985 will scoff over 50kg of the stuff this year. That in turn pushes up demand for grain: it takes 8kg of grain to produce one of beef.

But the rise in prices is also the self-inflicted result of America's reckless ethanol subsidies. This year biofuels will take a third of America's (record) maize harvest. That affects food markets directly: fill up an SUV's fuel tank with ethanol and you have used enough maize to feed a person for a year. And it affects them indirectly, as farmers switch to maize from other crops. The 30m tonnes of extra maize going to ethanol this year amounts to half the fall in the world's overall grain stocks.

Dearer food has the capacity to do enormous good and enormous harm. It will hurt urban consumers, especially in poor countries, by increasing the price of what is already the most expensive item in their household budgets. It will benefit farmers and agricultural communities by increasing the rewards of their labour; in many poor rural places it will boost the most important source of jobs and economic growth.

Although the cost of food is determined by fundamental patterns of demand and supply, the balance between good and ill also depends in part on governments. If politicians do nothing, or the wrong things, the world faces more misery, especially among the urban poor. If they get policy right, they can help increase the wealth of the poorest nations, aid the rural poor, rescue farming from subsidies and neglect—and minimise the harm to the slum-dwellers and landless labourers. So far, the auguries look gloomy.

In the trough

That, at least, is the lesson of half a century of food policy. Whatever the supposed threat—the lack of food security, rural poverty, environmental stewardship—the world seems to have only one solution: government intervention. Most of the subsidies and trade barriers have come at a huge cost. The trillions of dollars spent supporting farmers in rich countries have led to higher taxes, worse food, intensively farmed monocultures, overproduction and world prices that wreck the lives of poor farmers in the emerging markets. And for what? Despite the help, plenty of Western farmers have been beset by poverty. Increasing productivity means you need fewer farmers, which steadily drives the least efficient off the land. Even a vast subsidy cannot reverse that.

With agflation, policy has reached a new level of self-parody. Take America's supposedly verdant ethanol subsidies. It is not just that they are supporting a relatively dirty version of ethanol (far better to import Brazil's sugar-based liquor); they are also offsetting older grain subsidies that lowered prices by encouraging overproduction. Intervention multiplies like lies. Now countries such as Russia and Venezuela have imposed price controls—an aid to consumers—to offset America's aid to ethanol producers. Meanwhile, high grain prices are persuading people to clear forests to plant more maize.

Dearer food is a chance to break this dizzying cycle. Higher market prices make it possible to reduce subsidies without hurting incomes. A farm bill is now going through America's Congress. The European Union has promised a root-and-branch review (not yet reform) of its farm-support scheme. The reforms of the past few decades have, in fact, grappled with the rich world's farm programmes—but only timidly. Now comes the chance for politicians to show that they are serious when they say they want to put agriculture right.

Cutting rich-world subsidies and trade barriers would help taxpayers; it could revive the stalled Doha round of world trade talks, boosting the world economy; and, most important, it would directly help many of the world's poor. In terms of economic policy, it is hard to think of a greater good.

Where government help is really needed

Three-quarters of the world's poor live in rural areas. The depressed world prices created by farm policies over the past few decades have had a devastating effect. There has been a long-term fall in investment in farming and the things that sustain it, such as irrigation. The share of public spending going to agriculture in developing countries has fallen by half since 1980. Poor countries that used to export food now import it.

Reducing subsidies in the West would help reverse this. The World Bank reckons that if you free up agricultural trade, the prices of things poor countries specialise in (like cotton) would rise and developing countries would capture the gains by increasing exports. And because farming accounts for two-thirds of jobs in the poorest countries, it is the most important contributor to the early stages of economic growth. According to the World Bank, the really poor get three times as much extra income from an increase in farm productivity as from the same gain in industry or services. In the long term, thriving farms and open markets provide a secure food supply.

However, there is an obvious catch—and one that justifies government help. High prices have a mixed impact on poverty: they hurt anyone who loses more from dear food than he gains from a higher income. And that means over a billion urban consumers (and some landless labourers), many of whom are politically influential in poor countries. Given the speed of this year's food-price rises, governments in emerging markets have no alternative but to try to soften the blow.

Where they can, these governments should subsidise the incomes of the poor, rather than food itself, because that minimises price distortions. Where food subsidies are unavoidable, they should be temporary and targeted on the poor. So far, most government interventions in the poor world have failed these tests: politicians who seem to think cheap food part of the natural order of things have slapped on price controls and export restraints, which hurt farmers and will almost certainly fail.

Over the past few years, a sense has grown that the rich are hogging the world's wealth. In poor countries, widening income inequality takes the form of a gap between city and country: incomes have been rising faster for urban dwellers than for rural ones. If handled properly, dearer food is a once-in-a-generation chance to narrow income disparities and to wean rich farmers from subsidies and help poor ones. The ultimate reward, though, is not merely theirs: it is to make the world richer and fairer.