Saudi Arabia aims to build 41 gigawatts of solar capacity — more than any nation has today — in the first half of this century. (Fahad Shadeed /Reuters)

As Jeffrey Ball puts it in the July-August issue of the Atlantic magazine, oil-rich Saudi Arabia has long been “a poster child for fossil-fuel waste.” Gasoline is sold at 50 cents a gallon, electricity is made in colossally inefficient oil-burning plants, people run their air conditioning while they’re out of town for weeks at a time. As a result, the country — with 30 million people, it is the 44th-most-populous in the world — is the sixth-largest consumer of oil.

But times are changing, Ball reports in “Why the Saudis Are Going Solar.” The petro-kingdom is preparing to build a solar-panel factory, another factory is about to produce polysilicon for solar cells, and 10 big solar projects are getting underway. The country has set a goal of building 41 gigawatts of solar capacity — more than any nation has today — in the first half of this century. Why? Because its domestic oil consumption has gotten so out of control and is increasing so fast that the kingdom could be a net oil importer in just over 20 years. That would wreak havoc in a country where political stability rests on the royal family’s ability to keep its subjects happy without making them pay taxes.

“Solar, they have decided, is an obvious alternative,” Ball continues. “In addition to having some of the world’s richest oil fields, Saudi Arabia also has some of the world’s most intense sunlight.” (Some people have all the luck.)

There’s a certain disconnect between aspiration and reality, with dust storms clouding the solar panels and problems with imported manufacturing parts. But Ball concludes that the surprising truth remains: Saudi Arabia may become a model for other countries trying to shift away from oil. And if that doesn’t happen, the desert kingdom could end up exporting its solar riches to us they way they traditionally have exported oil.