Keeping healthy could become more costly as climate change and water scarcity cause a huge drop in the global production of vegetables and legumes, scientists said Monday.

The amount of vegetables produced could fall by more than a third, especially in hot regions like southern Europe and swaths of Africa and South Asia, said researchers from the London School of Hygiene and Tropical Medicine.

By analyzing studies across 40 countries, with some dating as far back as 1975, they found that hikes in greenhouses gases, water scarcity and global temperatures lowered the amount of vegetables and legumes produced.

Such drastic changes could drive up the prices of vegetables, which would affect poorer communities the most, according to the study, which was published in the Proceedings of the National Academy of Sciences.

"If we take a 'business as usual' approach, environmental changes will substantially reduce the global availability of these important foods," said Alan Dangour, a co-author of the paper, in a statement.

Scientists have warned that world temperatures are likely to rise by 2 degrees to 4.9 degrees Celsius this century compared with pre-industrial times.

This could lead to dangerous weather patterns — including more frequent and powerful droughts, floods and storms — increasing the pressure on agriculture.

Food production itself is a major contributor to climate change.

Agriculture, forestry and changes in land use together produce nearly a quarter of global greenhouse gas emissions, making them the second-largest emitter after the energy sector, said the United Nations Food and Agriculture Organization.

The volume of food transported around the world also is exacerbating global warming.

The global demand for food is expected to soar as the world's population is projected to grow to 9.8 billion people by 2050, up from 7.6 billion today, according to the U.N.

Crops now take up 11 percent of the world's land surface, and livestock grazing covers 26 percent of ice-free land, according to the Organization for Economic Cooperation and Development (OECD).

Farming accounts for about 70 percent of all water used globally, said the OECD.

Water scarcity already affects more than 40 percent of the world's population, according to the U.N.

That number is expected to rise due to global warming, with one in four people projected to face chronic or recurring shortages by 2050, the U.N. said.

"Urgent action needs to be taken, including working to support the agriculture sector to increase its resilience to environmental changes," said Dangour. "And this must be a priority for governments across the world."