By ELLEN KNICKMEYER

SAN FRANCISCO — California almonds are becoming one of the world’s favorite snacks and creating a multibillion-dollar bonanza for agricultural investors. But the crop extracts a staggering price from the land, consuming more water than all the showering, dish-washing and other indoor household water use of California’s 39 million people.

As California enters its fourth year of drought and imposes the first mandatory statewide water cutbacks on cities and towns, the $6.5 billion almond crop is helping drive a sharp debate about water use, agricultural interests and how both affect the state’s giant economy.

Almonds have claimed the spotlight as “the poster child of all things bad in water,” almond grower Bob Weimer said.

People around the world are eating over 1,000 percent more California almonds than they did just a decade ago, and last year almonds became the top export crop in the nation’s top agriculture state. China’s booming middle class is driving much of the demand.

That strong Asia market is producing up to 30 percent returns for investors, prompting agri-businesses to expand almond planting in the state by two-thirds in the past decade. The crop has come to be dominated by global corporations and investment funds.

Rows of almond trees now cover nearly 1 million acres (400,000 hectares) in California, many of them on previously virgin hillsides or in pastures or desert with little rain or local water. Since each tiny nut requires a gallon (3.8 liters) of water, almonds are consuming 1.07 trillion gallons (4.06 trillion liters) annually in the state, one-fifth more than California families use indoors.

So when Gov. Jerry Brown ordered cities and towns this month to cut their water consumption by 25 percent but exempted farms, almonds got toasted in the public heat that followed.

“Drought villains?” the Los Angeles Times asked this month. A Sacramento TV station referred to “almond-shaming.” National Public Radio called almond farms “a rogue’s gallery” of water users.

Now almond farmers and investors are on the defensive.

“The tomato growers use a lot more water than we do. You should go after those guys,” said Ryon Paton, a global real-estate developer and principal of Trinitas Partners.

Paton’s online literature tells investors to think of his newly planted almond orchards in Stanislaus County as “the classic Silicon Valley startup, except we have nothing to do with technology.”

California growers provide 80 percent of the global supply of almonds. In China, where the number of middle-class households has doubled since 2006, consumers see almonds as a healthy snack and regard American food in general as less contaminated than products from elsewhere.

California almonds are a popular bagged treat in China’s convenience stores and supermarkets and a must-have item in holiday gift baskets.

As big a global money-maker as California’s agriculture is, though, it’s little more than a blip in the state’s economy. And that’s driving the debate on water use.

In all, agriculture uses 80 percent of the water that Californians draw from groundwater and surface supplies but produces just 1.5 percent of the state’s gross domestic product, noted Christopher Thornberg, an economist who has served as an economic adviser to state agencies.

Other top almond producers include Stewart and Lynda Resnik, the politically influential Beverly Hills billionaires behind Fiji bottled water, Pom pomegranate juice and a Central Valley almond and pistachio operation that they say is one of the world’s largest.

Smaller almond farmers view the newer, bigger almond investors skeptically.

“They shouldn’t be growing almonds or walnuts in those areas,” including parts of the state that are naturally too dry and too cold for almond trees, said Paul Wenger, head of the state Farm Bureau and an almond and walnut grower on land near Modesto that’s been in his family for a century.

Almonds aren’t even the biggest sponges when it comes to water-thirsty crops in semi-arid California – that would be the state’s million acres (400,000 hectares) of alfalfa, which go to feed livestock.

Unlike the row crops they’re displacing, the new almond trees require water year round.

The governor and his cabinet secretaries defend almonds as a high-value crop.

“We’re going to try to maximize all beneficial uses, not pick one we like better than the others,” said Felicia Marcus, head of the state Water Resources Control Board.