Wouldn't it be ironic if the biggest oil exporters in the world became the biggest solar energy investors with plans to export solar energy?

That may seem like a far-fetched idea but it's exactly what Saudi Arabia has in mind. Here's a telling quote from one of the companies looking to provide some of the country's solar energy needs.

I think in 2020 we're going to look back and say -- if we pick one year as a point of inflexion -- I'm very confident it will be 2015." -- Paddy Padmanathan, CEO of ACWA Power, a renewable energy developer in the Middle East

What's driving the world's largest oil exporter to solar may tell us more about the future of energy than you think.

Saudi Arabia is better off selling oil than consuming it

One of the challenges being a developing nation that's made its money on oil exports is that a rising standard of living can eat into previous energy exports. Over the past decade, Saudi Arabia's oil consumption has risen 53% while its production is up just 5%. The result is falling oil exports, which is where the country makes its money.

A recent Chatham House paper suggested that at its current pace Saudi Arabia would actually become a net oil importer by 2038. That's only 23 years away, hardly a long time in the oil industry.

On top of the fact that Saudi Arabia would like to export more oil instead of consuming it, oil is a relatively expensive way to produce electricity. Renewable energy is much cheaper than oil power generators today, particularly in desert areas. A project bid below $0.06 per kWh in Dubai earlier this year showed the potential solar energy has in the Middle East and with Saudi Arabia getting 55% of its electricity from oil, there's an economic driver to making a change.

The tip of the iceberg for solar energy

For a relatively small country, Saudi Arabia has an incredible potential in solar. Population has grown 12% in the last four years and GDP per capita over that time is up 27% over the same time frame. As a result, energy consumption is growing by double digits every year.

With 50 GW of current electricity generation and talk of potentially exporting solar electricity, there could be a 200 GW or greater opportunity for solar in Saudi Arabia (based on a 25% capacity factor for solar). Saudi Arabia already has a $109 billion plan for renewable energy on the books by 2040, so the opportunity for solar companies is incredible.

This is on the backdrop of 55 GW of solar expected to be installed this year. So, Saudi Arabia could quickly be a top 5 solar market.

Who wins in Saudi Arabia

The question now is who would be able to win contracts in Saudi Arabia?

One thing the country appears to be looking into closely is technology and that's where First Solar (NASDAQ:FSLR) and SunPower (NASDAQ:SPWR) have significant advantages over competitors. First Solar's thin-film solar modules work well in hot desert conditions and SunPower's high-efficiency cells and concentrator products can generate more power than any other technology from each acre of land.

By the end of 2015, First Solar and SunPower are expecting to have 2.5 GW and 1.5 GW of annual manufacturing capacity respectively, so even a GW or two of demand from Saudi Arabia could have a huge impact. That's why these companies see the Middle East as such a growth opportunity. It could expand the pie for solar in general and with the country looking to build large plants, where these two specialize, they could have an advantage over competitors.

SunPower's relationship with Total, who is its majority owner and has been working in Saudi Arabia for nearly 40 years, may give the company a leg up in potential deals there. It helps to come to the table with a known partner in the Middle East.

No matter how you slice it, Saudi Arabia is a big potential market for the solar industry and its leaders appear to be realizing that it's the right energy investment to make now. That's a big step for a country that's known the world over as an exporter of oil.