Over the next two weeks, world leaders are gathering in Marrakesh, Morocco to discuss perhaps the greatest challenge facing our world: climate change.

It's no coincidence that the meeting – formally called COP22 – is being held in the Middle East and North Africa (MENA). For decades synonymous with oil and gas, the region is now transforming itself into a haven for inexpensive, clean energy. From wind farms in Morocco to solar parks in Jordan, modern, renewable energy facilities are popping up across MENA. They are part of an ambitious push by regional states to cut ties with carbon-heavy fossil fuels. It's a drive that is clearly serving as an example for the rest of the world.

The shift away from oil and gas is being driven by a combination of demographics, economics and concerns over supplies. A fast-growing regional population has caused demand for power to rise about 5% annually since 2000. That has been problematic, to say the least, for the many MENA countries without massive reserves of fossil fuels. They have relied ever more on expensive, and polluting, imports. Several have struggled to keep up, leading to regular – and crippling – blackouts in places like Egypt.

Even states with oil and gas are feeling the pinch. In some countries, like those in the Gulf Co-Operation Council, many reserves are already earmarked for other priorities. That makes it harder for officials to subsidize power and fuel, as they have done heavily for decades.

Renewable energy offers a way out of this. While only a few nations have large oil and gas reserves, nearly every country in MENA has enough sunlight to support a thriving solar industry. In fact, enough rays hit the region to power the entire planet, studies say. At the same time, MENA's coasts – especially around the Mediterranean and Red seas – are continually buffeted by high-quality winds, making them ideal locations for wind farms.

While MENA has plenty of potential when it comes to renewable energy, harnessing solar rays and coastal winds has historically been expensive. That has changed, though. The price of components for solar plants and wind farms has tumbled in recent years while scale and the creativity of developers have released other savings. Renewables have gone from exotic sources of power to ones that can compete with fossil fuels, even those heavily subsidized by governments. As a result, an increasing number of countries across MENA are setting ambitious official targets for renewable power, while creating laws to cultivate the industry.

Those policies are now bearing fruit. In Morocco, for example, a partnership between the government and the private sector is building what will be the largest solar plant in the world. Located in the desert outside Ouarzazate, the $3.9 billion plant will produce enough electricity to power more than a million homes when it's completed in 2018. Meanwhile, in Jordan, private firms have already built 12 solar plants and are in the process of building at least seven more, the largest collection of privately owned power plants in the region. Furthermore, the United Arab Emirates, one of the first markets in the world to welcome privately owned independent power producers (IPPs) in the 1990s, has in recent tenders achieved solar power tariff levels at below three cents per kilowatt hour – setting the current world record.

These are encouraging signs, but many states in MENA are just scratching the surface of their potential. There are several things these states can do to catch up and bolster the renewable energy industry.

First, these countries should open up their electricity sector to private power companies, which can bring the expertise and financial clout to produce affordable renewable energy on a commercial scale. To do so successfully, clear, transparent rules for IPPs within a stable regulatory framework need to demonstrate a level playing field where private investors can be confident they will be treated fairly throughout the life of their assets.

In countries without a proven IPP track record, governments might consider, as was successfully implemented by Jordan, also setting an attractive feed-in tariff for a limited sized first round of renewable projects to encourage the private sector to enter and demonstrate the bankability of their market. Once proven, subsequent rounds could be opened to competitive tenders.

Furthermore, governments need to gradually remove distortions to the market, such as subsidies on fossil fuels, coupled with appropriate social safety nets, allowing the market to react to the real economic cost of generation. Finally, states and private sector can both turn to international institutions, such as the World Bank Group, to help plan, structure, and finance these projects.

By doing those things, MENA can foster the development of a vibrant renewable energy industry – laying the foundation for a carbon-free future.