– Desalinated seawater is the lifeblood of Saudi Arabia, no more so than at King Abdullah University of Science and Technology, an international research center that rose from the dry, empty desert a decade ago.

Produced from water from the adjacent Red Sea that is forced through salt-separating membranes, it is piped into the campus’ gleaming lab buildings and the shops, restaurants and cookie-cutter houses of the surrounding planned neighborhoods. It irrigates the palm trees that line the immaculate streets and the grass field at the 5,000-seat sports stadium. Even the swimming pools are filled with hundreds of thousands of gallons of it.

Desalination provides all of the university’s fresh water, nearly 5 million gallons a day. And desalinated water makes up about half of the fresh water supply in this nation of 33 million people, one of the most water-starved on Earth.

Worldwide, desalination is increasingly seen as one possible answer to problems of water quantity and quality that will worsen with global population growth and the extreme heat and prolonged drought linked to climate change.

“It is a partial solution to water scarcity,” said Manzoor Qadir, an environmental scientist with the Water and Human Development Program of United Nations University.

Saudi Arabia and other countries in the Middle East and North Africa are at the center of this growth, with large new desalination projects planned or being built. Renewable water supplies in most of these countries already fall well below the United Nations definition of absolute water scarcity, which is about 350 gallons per person per day, and a 2017 report from the World Bank suggests that climate change will be the biggest factor increasing the pressure on water supplies.

Yet “in low income countries, almost nothing is happening,” Qadir said.

The primary reason is cost. Desalination remains expensive, as it requires enormous amounts of energy. To make it more affordable and accessible, researchers around the world are studying how to improve desalination processes, devising more effective and durable membranes, for example, to produce more water per unit of energy, and better ways to deal with the highly concentrated brine that remains.

Desalination is largely limited to more affluent countries, especially those with ample fossil fuels and access to seawater (although brackish water inland can be desalinated, too). In addition to the Middle East and North Africa, desalination has made inroads in water-stressed parts of the United States, notably California, and other countries including Spain, Australia and China.

There are environmental costs to desalination as well: in the emissions of greenhouse gases from the energy used, and in the disposal of the brine, which in addition to being extremely salty is laced with toxic treatment chemicals.

Desalinated water still accounts for about 1% of the world’s fresh water.

Even in Saudi Arabia, where vast oil reserves and wealth have made the country the world’s desalination leader, there is a realization that the process must be made more affordable and sustainable.

“We are trying to develop new processes, to consume less energy and be more environmentally friendly,” said Noreddine Ghaffour, a researcher in the Water Desalination and Reuse Center at the university, which is universally known as Kaust.

As the center’s name implies, there is also a realization that treating and reusing wastewater can help decrease stress on water supplies.

Outside the main Kaust desalination plant, which uses a technology called reverse osmosis, four huge tanks full of sand filter impurities from the seawater as it arrives through a pipeline. Inside, the water is forced at up to 70 times atmospheric pressure into several hundred steel tubes, each stuffed with spiral-wound membranes.

The microscopic pores in the membranes allow water molecules through but leave salt and most other impurities behind. Fresh water comes out of plastic pipes at the end of each tube.

Worldwide, almost all new desalination plants use reverse osmosis, which was introduced half a century ago. Over the decades, engineers have made the process much more efficient, and significantly reduced costs, through the development of bigger plants and better membranes and energy-recovery methods. “That is huge,” said Paul Buijs of Kaust. “But each step of 10 times bigger is roughly taking 15 to 20 years.”