Because the world’s largest oil producer will soon run out of the “good sh*t.” How Saudi Arabia handles the transition will be a case study for future students everywhere.

Saudi Arabia, the Middle East’s biggest economy and the world’s largest oil producer, is running out of its black gold. Some estimate that the wells will run dry as early as 2030. That’s a huge deal. Oil revenue reached $312 billion this year and accounts for almost half the economy and 90 percent of export revenue. It also makes the kingdom the Persian Gulf’s economic powerhouse.

That’s why diversification is no longer a luxury. Opening its notoriously insulated stock exchange to foreign investors and investing in solar power, poultry, dairy, petrochemicals and innovative technology — these are the threads stitching together the kingdom’s safety net. Here are the companies leading the way forward:

The Pitch: Global petrochemical leader

Size: $103.4 billion market value

CEO: Mohamed Al-Mady

Recent Moves: Recently crowned the Middle East’s big-biz king, SABIC is among the world’s largest petrochemical companies. Petrochemical usually means plastics and fertilizer, but SABIC is looking ahead with a host of new polycarbonate technologies, like solar panels, a film for touch screens and the first polycarbonate automobile wheel. Though it’s rolling back European operations, it’s venturing eagerly into the U.S., attracted by the shale oil boom. And with Saudi Arabia about to crack open its stock market to foreign investors, non-oil multinationals are poised for global prominence. Expect SABIC to receive the most lavish treatment from foreigners.

The Pitch: Leading the kingdom’s startup revolution

Size: Acquired for $16 million by SAS Holdings

Founder: Khalid Alkhudair

Recent Moves: To kick their country’s oil addiction, Saudi leaders have launched hundred-million-dollar venture funds and incubators nationwide. The goal? A knowledge-based economy by 2025. The pre-eminent career portal for Saudi women is a poster child for the kingdom’s startup offensive, not to mention female workplace empowerment. Glowork’s market is potentially tremendous: A third of women are unemployed, and because most of them are college educated, they represent a real opportunity cost. And a government cost, too, because the jobless receive $800 a month from the government — a total of $1.6 billion down the drain, according to Alkhudair.

The Pitch: Jolly green oil giant

Recent Moves: The Saudi government is planning an ambitious solar renaissance — the kingdom wants its energy mix to include 23 percent solar by 2030 and 39 percent by 2050. With lots of sunshine, low-cost funding and abundant space, Saudi Arabia has already developed one of the world’s cheapest solar models. Saudi Arabia might be the site of a perfect solar storm.CEO: Khalid A. Al-FalihSize: 9.5 million barrels of crude oil production daily; 54,000 employees

Saudi Aramco is poised to helm it. The state-owned behemoth and undisputed world petroleum champion was once valued at $7 trillion, almost half of the U.S. GDP ($16.8 trillion in 2013). The coming oil crunch has it staking a claim in solar and other alternative energies.

Although progress toward solar salvation has been slow, Aramco is still investing heavily in other potentially revolutionary alternative energy solutions. This month, it spearheaded a $30 million investment in San Francisco-based Siluria Technologies, which plans to produce low-cost gasoline from natural gas — for $1 per gallon.

The Pitch: Moving Saudi Arabia from fuel to food

Size: $10.4 billion market cap; 16,000 employees

Founder: Prince Sultan bin Mohammed bin Saud Al Kabeer

Recent Moves: The region’s largest food company is in the right place at the right time. Saudi Arabia is the world’s largest importer of broiler meat, mostly chicken, to the tune of 875,000 metric tons in 2013. Domestic competitors like Almarai are ripe for growth. Already, poultry production is on the rise in the kingdom and is expected to swell 52 percent by 2018.

Almarai is showing other signs of international ambition. In partnership with PepsiCo, it launched a $345 million investment in Egypt this June, and its CEO has stated he plans to boost that figure to $560 million in five years. The funds will go toward a new juice factory, a 5,000-cow dairy farm and expanding existing facilities for Egyptian beverage firm Beyti. Drink and eat up!