SURABAYA, Indonesia – With the dollar a day he earns scrounging for scrap metal and paper, Jumadi can’t buy his family beef or even chicken. But until now, the rail-thin scavenger could at least afford soy.

His wife and two children snacked on slabs of fried fermented soy, known as tempeh, and tossed the cake-like staple into bland bowls of noodles and soup. The soy provided protein, and it was cheap.

Not any more. The cost of tempeh and tofu has doubled to record highs, driven by the soaring price of soybeans imported from the United States.

“What kind of life is this?” complained the 25-year-old, who like many Indonesians goes by only one name, as he stood outside his plywood shack that was buzzing with flies. “I just eat crackers now.”

The cost of soy is spreading hunger on the country’s main island of Java, where millions of poor and working-class families depend on tofu and tempeh every day. It is also devastating an entire local industry based on soy products. Hundreds of factories have closed, thousands of people have taken to the streets to protest soy prices, and at least one soy vendor killed himself after falling into debt.

The lessons of the soy crunch go far beyond Indonesia.

Over the past decade, Indonesia went from growing more than half its soy to relying on the United States for 70 percent of it. Now the poor among this country’s 220 million people are going hungry because of changes thousands of miles beyond their shores. It is the same story for dozens of countries that came to depend on richer nations for cheap food, only to find themselves squeezed when prices started rising last year.

“There has been a drastic change in prices, and these smaller countries have little to say. They basically have to take it,” said Abdolreza Abbassian, a grain economist with the FAO. “They were exposed to the negative sides of globalization, rather than the positive.”

Soy has long been a staple in Indonesia. But in the 1990s, farmers complained that it was too expensive to grow because the government did not provide cheap seed or low-interest loans. At the same time, they could not compete with cheaper, better soy from countries like the United States, where farmers had advanced technology and government subsidies.

Ruslan, who farms 7 1/2 acres in Ponorogo in East Java, planted soybeans for two decades. But in the late 1990s, the 50-year-old farmer began growing melons, corn, onions and chili instead.

“I got out of the soybean business because the cost of production was so high that I was not making any profit,” he said. “Since I switched to corn and melons, I’ve always had a good profit.”

Because of farmers like Ruslan, Indonesia’s soy production dropped over the past nine years from 1.4 million tons to around 700,000. The country stopped fixing prices for imported soy, and this year it eliminated import tariffs on soybeans.

At first the imports worked fine. Beans were big, prices were low, and people were happy.

But Indonesia was now dependent on the soy fields of the U.S. And it paid the price when the Mississippi River flooded in June, leaving thousands of acres of soybeans waterlogged. By July, soybean futures were up 82 percent over the past year, although they have come down since.

Indonesia also felt the ripples from a new demand for alternative fuels. About 20 percent of soy now goes to make biodiesel in the U.S., up from almost nothing three years ago, the FAO said. And the demand for corn to make ethanol has prompted American farmers like Larry Gleason and Tim Henning to switch away from soy.

Gleason, his three brothers and his dad split 3,500 acres in central Illinois evenly between soy and corn until last spring. Now 70 percent goes to corn.

“It’s like any other business: You try to find where you’re going to make the most money,” Gleason said.

Because of the demand for ethanol, the U.S. expanded corn production by 23 percent in 2007, the World Bank found. At the same time, it reduced soybean fields by 16 percent.

Henning calculated last spring that corn brought $75 to $85 more profit per acre than soy. So in 2007, he planted 50 more acres of corn on his 800-acre Minnesota farm and that much less soy. At a time when costs have risen for fuel, fertilizer, machinery and land, Henning is trying to squeeze what money he can from the earth.

“A number of years ago, the farmer got blamed because corn and bean prices were too cheap and farmers overseas were going broke,” said Henning, 50. “Now, they are saying the prices are too high and people can’t afford to buy the food. So, we kind of feel we are in a damned-if-you-do, damned-if-you-don’t situation.”

Fuel costs are making it more expensive not just to grow soy, but also to transport it to faraway places like Indonesia by truck, rail and ship.

The story of the soybean ends back in Indonesia, in cities like Bandung, famous for its tempeh and tofu industry.

Streets in this West Java city are lined with shops selling crispy tempeh crackers and vendors with small carts offering meatball soup with tofu to passing motorists.

The Indonesian government responded to the rise in soybean prices by providing subsidized cooking oil and rice to 19 million households and offering subsidized soybeans to more than 100,000 small tofu and tempeh producers.

It also launched a plan to spend more on agriculture and offer incentives like cheap fertilizer, but Indonesia will not be able to meet its own demand for soy until at least 2015.

There is now talk of giving the state the power to set the price for imported soybeans, which worries Ali Basry, the American Soybean Association’s country representative. Basry said the rising prices are simply a reflection of market forces.

“Suddenly, the government is trying to calm the situation by putting a subsidy on the bean price,” he said. “I don’t know.”

But tofu and tempeh producers want fixed prices and accuse importers of profiting from the volatility. They are convinced the problem remains the country’s dependence on imports.

“In the past, this was profitable. You can see I bought a house. But now, it’s difficult to even buy food for my children. Last year, I could go on a holiday. Now, I can’t go anywhere.”