The mile upon mile of tall maize waving to the horizon around the small Nebraskan town of Carleton looks perfect to farmers such as Mark Jagels. He and his father farm 2,500 acres (10sq km), the price of maize - what the Americans call corn - has never been higher, and the future has seldom seemed rosier. Carleton (town motto: "The center of it all") is booming, with $200m of Californian money put up for a new biofuel factory and, after years in the doldrums, there is new full-time, well-paid work for 50 people.

But there is a catch. The same fields that surround Jagels' house on the great plains may be bringing new money to rural America, but they are also helping to push up the price of bread in Manchester, tortillas in Mexico City and beer in Madrid. As a direct result of what is happening in places like Nebraska, Kansas, Indiana and Oklahoma, food aid for the poorest people in southern Africa, pork in China and beef in Britain are all more expensive.

Challenged by President George Bush to produce 35bn gallons of non-fossil transport fuels by 2017 to reduce US dependency on imported oil, the Jagels family and thousands of farmers like them are patriotically turning the corn belt of America from the bread basket of the world into an enormous fuel tank. Only a year ago, their maize mostly went to cattle feed or was exported as food aid. Come harvest time in September, almost all will end up at the new plant at Carleton, where it will be fermented to make ethanol, a clear, colourless alcohol consumed, not by people, but by cars.

The era of "agrofuels" has arrived, and the scale of the changes it is already forcing on farming and markets around the world is immense. In Nebraska alone, an extra million acres of maize have been planted this year, and the state boasts it will produce 1bn gallons of ethanol. Across the US, 20% of the whole maize crop went to ethanol last year. How much is that? Just 2% of US automobile use.

"Probably hasn't looked any better than it looks right now," Jerry Stahr, another Nebraskan farmer, told his local paper recently.

Jagels and Stahr are part of a global green rush, one of the greatest shifts that world agriculture has seen in decades. As the US, Europe, China, Japan and other countries commit themselves to using 10% or more alternative automobile fuels, farmers everywhere are rushing to grow maize, sugar cane, palm oil and oil seed rape, all of which can be turned into ethanol or other biofuels for automobiles. But that means getting out of other crops.

The scale of the change is boggling. The Indian government says it wants to plant 35m acres (140,000 sq km) of biofuel crops, Brazil as much as 300m acres (1.2m sq km). Southern Africa is being touted as the future Middle East of biofuels, with as much as 1bn acres (4m sq km) of land ready to be converted to crops such as Jatropha curcas (physic nut), a tough shrub that can be grown on poor land. Indonesia has said it intends to overtake Malaysia and increase its palm oil production from 16m acres (64,000 sq km) now to 65m acres (260,000 sq km) in 2025.

While this may be marginally better for carbon emissions and energy security, it is proving horrendous for food prices and anyone who stands in the way of a rampant new industry. A year or two ago, almost all the land where maize is now being grown to make ethanol in the US was being farmed for human or animal food. And because America exports most of the world's maize, its price has doubled in 10 months, and wheat has risen about 50%.

The effect on agriculture in the UK is price increases all round. "The world price [of maize] has doubled," says Mark Hill, food partner at the business advisory firm Deloitte. "In June, wheat prices across the US and Europe hit their highest levels in more than a decade. These price hikes are likely to trigger inflation in food prices, as processors are forced to pay increased costs for basic ingredients such as corn and wheat."

UK flour millers, for example, need 5.5m tonnes of wheat to produce the 12m loaves sold each day in the UK. The majority of this wheat is grown in the UK, and in the last year milling wheat prices moved from around £100 a tonne to £200 a tonne. Hovis raised the price of a standard loaf from 93p to 99p in February and has said more increases are on the way. In France, consumers have also been warned that their beloved baguette will become more expensive.

The era of cheap food is over, says Hill. World commodity prices of sugar, milk and cocoa have all surged, prompting the biggest increase in retail food prices in three decades in some countries. "Meat, too, will cost more because chicken and pigs are fed largely on grain," says Hill. "And while anyone growing grains will be better off, dairy and livestock producers may well struggle in this environment."

But the surge in demand for agrofuels such as ethanol is hitting the poor and the environment the hardest. The UN World Food Programme, which feeds about 90m people mostly with US maize, reckons that 850m people around the world are already undernourished. There will soon be more because the price of food aid has increased 20% in just a year. Meanwhile, Indian food prices have risen 11% in a year, the price of the staple tortilla quadrupled in Mexico in February and crowds of 75,000 people came on to the streets in protest. South Africa has seen food-price rises of nearly 17%, and China was forced to halt all new planting of corn for ethanol after staple foods such as pork soared by 42% last year.

In the US, where nearly 40 million people are below the official poverty line, the Department of Agriculture recently predicted a 10% rise in the price of chicken. The prices of bread, beef, eggs and milk rose 7.5 % in July, the highest monthly rise in 25 years.

"The competition for grain between the world's 800 million motorists, who want to maintain their mobility, and its two billion poorest people, who are simply trying to survive, is emerging as an epic issue," says Lester Brown, president of the Washington-based Worldwatch Institute thinktank, and author of the book Who Will Feed China?

It is not going to get any better, says Brown. The UN's World Food Organisation predicts that demand for biofuels will grow by 170% in the next three years. A separate report from the OECD, the club of the world's 30 richest countries, suggested food-price rises of between 20% and 50% over the next decade, and the head of Nestlé, the world's largest food processor, said prices would remain high as far as anyone could see ahead.

A "perfect storm" of ecological and social factors appears to be gathering force, threatening vast numbers of people with food shortages and price rises. Even as the world's big farmers are pulling out of producing food for people and animals, the global population is rising by 87 million people a year; developing countries such as China and India are switching to meat-based diets that need more land; and climate change is starting to hit food producers hard. Recent reports in the journals Science and Nature suggest that one-third of ocean fisheries are in collapse, two-thirds will be in collapse by 2025, and all major ocean fisheries may be virtually gone by 2048. "Global grain supplies will drop to their lowest levels on record this year. Outside of wartime, they have not been this low in a century, perhaps longer," says the US Department of Agriculture.

In seven of the past eight years the world has actually grown less grain than it consumed, says Brown. World stocks of grain - that is, the food held in reserve for times of emergency - are now sufficient for just over 50 days. According to experts, we are in "the post- food-surplus era".

The food crisis, Brown warns, is only just beginning. What worries him as much as the new competition between food and fuel is that the booming Chinese and Indian populations - the two largest nations in the world, with nearly 40% of the world's population between them - are giving up their traditional vegetable-rich diets to adopt typical "American" diets that contain more meat and dairy products. Meat demand in China has quadrupled in 30 years, and in India, milk and egg products are increasingly popular.

In itself, this is no problem, say Brown and others, except that it means an accelerated demand for water to grow more food. It takes 7kg of grain to produce 1kg of beef, and increased demand will require huge amounts of grain-growing land. Much of this, of course, will need to be irrigated. "Water tables are now falling in countries that contain over half the world's people," Brown points out. "While numerous analysts and policymakers are concerned about a future of water shortages, few have connected the dots to see that a future of water shortages means a future of food shortages."

New figures from the World Bank, he says, show that 15% of the world's present food supplies, on which 160 million people depend, are being grown with water drawn from rapidly depleting underground sources or from rivers that are drying up. In large areas of China and India, the water table has fallen catastrophically.

Scientists are becoming increasingly alarmed. Earlier this year, water specialists from hundreds of institutes around the world published the biggest ever assessment of water and food. Their conclusions were chilling. With the earth's water, land and human resources, it would be possible to produce enough food for the future, they said. "But it is probable that today's food production and environmental trends will lead to crises in many parts of the world," said David Molden, deputy director general of the International Water Management Institute.

Climate change, meanwhile, is leading to more intense rains, unpredictable storms, longer-lasting droughts, and interrupted seasons. In Britain, the recent floods will result in a shortage of vegetables such as potatoes and peas, and cereals such as wheat. This comes on top of a 4.9% rise in food prices in the year to May - well over consumer price inflation - and a 9.6% hike in vegetable prices.

Britain can get by, but elsewhere climate change is proving disastrous. "I met leaders from Madagascar reeling from seven cyclones in the first six months of the year," Josette Sheeran, new director of the World Food Programme, told colleagues in Rome recently. "I asked them when the season ends and was told that such questions are becoming more difficult to answer. Farmers know that predictable patterns in weather are becoming a thing of the past. How does the global food supply system deal with such changing risk?"

The answer is: with ever greater difficulty. The Intergovernmental Panel on Climate Change predicts that rain-dependent agriculture could be cut in half by 2020 as a result of climate change. "Anything even close to a 50% reduction in yields would obviously pose huge problems," said Sheeran. Within a week, Lesotho had declared a food emergency after the worst drought in 30 years and greatly reduced harvests in neighbouring South Africa pushed prices well beyond the reach of most of the population.

All this is far too gloomy, say other analysts and politicians. Earlier this year, Brazil's president, Luiz Lula, told the Guardian that there was no need for world food shortages, or any destruction of forests to grow more food at all. "Brazil has 320m hectares [3.2m sq km] of arable land, only a fifth of which is cultivated. Of this, less than 4% is used for ethanol production ... This is not a choice between food and energy."

Others say that the food price rises now being seen are temporary and will fall back within a year as the market responds. Technologists pin their faith on GM crops, or drought- resistant crops, or trust that biofuel producers will develop technologies that require less raw material or use non-edible parts of food. The immediate best bet is that countries such as Argentina, Poland, Ukraine and Kazakhstan will grow more food for export as US output declines.

Back on the great plains, meanwhile, ethanol fever is running high. This time last year, there were fewer than 100 ethanol plants in the whole United States, with a combined production capacity of 5bn gallons. There are now at least 50 more new plants being built and over 300 more are planned. If even half of them are finished, they will help to rewrite the politics of global food.

· The following correction was printed in the Guardian's Corrections and clarifications column, Saturday September 1 2007. In the article above we said in error that 2,500 acres is 10m sq km; we meant 10 sq km. This has been corrected.