OSLO, Norway -- Kristian Midtoy is a kindergarten chef in downtown Oslo.

Not a cook but a chef, whose specialties range from salmon sashimi to roasted venison and whose 100 customers range in age from 1 to 6.

His open kitchen area, which forms the center of the daycare, is constantly invaded by happy, hungry, and inquisitive children.

"We have lots of space so they can sit for a long time and enjoy the meal," Midtoy says. "And I try to take in a lot of whole animals with fur and whole fish and live crabs and lobsters, so they see that all the kinds of animals that we eat are not just packs in the stores. [The kids] are so curious and interested to see new things."

Even in Norway, the world's fourth-richest country by gross domestic product (GDP) per capita, a gourmet kindergarten is unusual.

But in a country where 80 percent of the kindergarten cost is subsidized by the state, the additional $116 a month that parents pay for the gourmet cuisine is something just about any parent can afford. Particularly when salaries in Norway, which is not a European Union member, are 50 percent higher than the average in the EU.

That Norway should be so wealthy is no surprise. It is the world's fifth-largest oil exporter, with annual oil revenues of around $40 billion, and boasts a vibrant and diversified economy that spreads prosperity widely within the society. In surveys of income inequality, Norway always ranks as one of the countries with the least differences of income between its citizens in the world.

And that is what sets it apart from many oil-producing countries, particularly in the former Soviet Union and the Middle East. There, oil generates revenues that make the governing elites fabulously wealthy, while the rest of the citizens depend on their leaders' handouts or upon trickle-down economics for their share of what is left.

How Norway manages its oil wealth could offer some valuable lessons for such countries. And to learn how Norway has been so successful is as easy as leaving Oslo and flying 50 minutes west to the North Sea port city of Stavanger, the capital of the country's offshore oil industry.

Lifting The Economy

Until oil was discovered in 1969, Stavanger was a fishing town whose best times had been a decades-long boom in herring fishing that ended suddenly with plunging catches after 1870. The collapse had left the town, like the rest of Norway, with a huge fleet of wooden sailing ships and an agricultural economy that was fast being left behind by its rapidly industrializing neighbors.

But oil changed everything.

"In 1960, the standard of living in Norway was about 30 or 40 percent lower than in Sweden or in Denmark," says Bruno Gerard, an economist at the Norwegian Business School in Oslo. "Now the standard of living in Norway is substantially higher than in those two countries."

The signs of how much prosperity oil has created are all around Stavanger, which has grown from a town of 90,000 people in the 1960s to a municipal region with a population of nearly 204,000 today.

Moored in Stavanger's harbor are huge ships, built in the region's shipyards, which carry supplies to the oil platforms offshore. Within the city limits are a new 10,000-student university, a new concert hall, and several museums. Outside the city, there is a vast greenhouse, growing fresh tomatoes even during the darkest winter days by using artificial light.

There are similar scenes up and down Norway's west coast, where a total of 70 oil platforms are in operation from the southern tip to the polar north. The platforms themselves, which belong to Norway's majority state-owned oil companies or foreign concessionaires, employ only a small number of people. But the drilling and production requires supporting activities that involves virtually every other sector and lifts the rest of the economy like a rising tide.

Dutch Disease

But if Norway's oil industry has made the country's population of 5 million people rich, it was not guaranteed from the start to do so. Many other countries have discovered that oil can wreak havoc on their economies by creating a wealthy energy-export sector while disrupting or even bankrupting other export sectors. The phenomenon is known as "Dutch disease" after what happened when the Netherlands discovered huge natural-gas deposits in the North Sea in the 1960s. And it almost happened to Norway, as well.

Living in Stavanger is a man who has witnessed Norway's oil history from its very start.

He is Iraqi-born Farouk al-Kasim, who began his career as a petroleum geologist in Basra but moved to Norway around the age of 30 with his Norwegian wife in order to get sustained medical treatment their son.

When he came to Norway in 1968, the country's first oil strike was still a year away. But he soon got a temporary job with the country's fledgling Oil Ministry because the foreign companies it had licensed to look for oil were sending in reams of promising reports and there were very few people in the government who could evaluate them. The job became permanent and from 1973 to 1991 he managed Norway's petroleum resources before retiring to become an international oil consultant.

When the first oil began to flow, Kasim remembers, the Norwegians' reaction was the same as that of any country that suddenly strikes black gold. People viewed the sudden windfall of oil revenues as an unqualified blessing. The money poured straight into the government budget, and public spending rose. But by 1972, it was clear the economy was in deep trouble.

"Norway had four years of Dutch disease, where wages went up, factories lost their top people to the oil industry, and foreigners coming in to invest in the oil boom drove up the value of the currency so high that customers in other countries could no longer afford Norway's other export products," he says. "Initially, the government reacted by handing out subsidies and we went deeper into the mire."

By 1976, Kasim says, the damage had put the fear of being hit by a tsunami of oil money deep into Norwegian hearts. The country decided to do what Iraq and many other oil-producing states never do: deliberately limit how much oil revenue enters the economy.

Initially, the government decided to take all the profits generated by its state-owned oil companies and reinvest them in searching for and producing more oil.

But by 1995, the flood of income had grown beyond what this could absorb. So, Norway created a special buffer fund to keep the oil profits out of the economy by declaring them the property of future generations of Norwegians. The government forbid itself from using more than 4 percent of the money for current infrastructure and other public projects and invested the rest in financial markets abroad, effectively sending it into exile.

Staying Afloat

One of the landmarks of Stavanger's port is a low modern building with a tower on one side which, on closer inspection, turns out to be a partial replica of an oil platform. The building is the Norwegian Petroleum Museum, built in the late 1990s to tell the public about the country's most important resource. Some 10,000 to 12,000 students visit it a year in school groups.

The museum has many interesting exhibits about underwater drilling technology. But one of its most memorable sights is an oversized digital counter whose rapidly spinning numbers resemble a clock in overdrive. It counts in real time how much oil money has been accumulating in Norway's buffer fund since 1995 instead of going into the current economy.

The clock today shows more than $890 billion. That is the equivalent of some $170,000 for every one of the country's citizens.

Officially, the money is earmarked for paying state pensions as Norway faces a balloon of retirements among aging baby boomers. But its more immediate purpose is ensure that Norway does not become too dependent upon its oil industry for its wealth that it loses its ability to compete later when the oil money runs out.

So far, the theory seems to be working well.

Just 45 minutes by ferry from Stavanger is a salmon farm of the kind that helps make Norway the second-largest seafood exporter in the world. It consists of a wooden houseboat floating in the mouth of a fjord where five men tend three enormous nets floating like fish bowls in the icy water.

Inside each net, which is 20 meters across and 35 meters deep, are 207,000 fish constantly circling and searching for food. During every eight-hour shift, the men dump 21 tons of food pellets into the nets until, after two years, the fish have grown large enough for market.

Nearby, on the island of Jutaberg, is Martin Steiness, a biologist with a company that supplies services to Norway's aquaculture sector. Swimming in tanks in a large, wet hall are some of his research subjects. They include a cute green creature called a lumpfish, which today has good commercial prospects because it eats sea lice off of captive salmon.

Steiness knows all about how too much oil money can skew an economy and drive sectors like his out of business. That's because even with the buffer fund, some symptoms of Dutch disease remain in the economy.

He says the seafood industry cannot afford to pay the high wages that oil companies can, making it tough for other sectors to get the top talent they need.

"In the aquaculture industry, most people working on sea farms don't need higher education," he says. "But in management you would need higher education and it is on that level that the competition is apparent."

Still, so long as Dutch disease is contained, the seafood sector can thrive and perhaps even emerge stronger from the pressure. Entrepreneurs are forced to be creative in seeking out high-end markets that can offset Norway's high wages and everybody seems to be on the lookout for new opportunities.

Steiness takes a visitor into a backroom to show off what he believes could be one of those opportunities: farm-raised sea urchins, whose eggs are popular as caviar in sushi restaurants. He hopes to unlock the secret of how to mass breed them.

When The Oil Runs Dry

But if today Norway's buffer fund allows the country to maintain a highly diversified economy, it also prepares for a future when, inevitably, the oil will run dry.

Bjorn Vidar Loeren of the Norwegian Oil and Gas Association has an office in a business park on the edge of Stavanger that is entirely filled by oil companies and supporting firms. Here, they are well aware that the output from Norway's oil fields has been declining since 2000, even with the discovery of a massive new field in 2011.

Loeren says the oil could run out in another 50 years but that natural-gas reserves should last longer: another 100 years at least. But no one knows for sure. Some other oil experts, like Kasim, estimate the oil could run out in as little as 30 years and gas in 50.

Still, like other Norwegians, Loeren is not unduly worried that one day the energy bonanza will end. So much money keeps pouring into the country's pension fund that in the future it will do far more than just cover retirements. It will also provide the country capital for developing new industries when the oil runs dry.

"Norwegian politicians have been very clever, very disciplined, so the day the oil age will end there will be money that can be converted into something else," Loeren says. "I think it is a fair concept to share the revenues from oil over a number of generations rather than spending everything up front."

Few other oil-rich states will be in as enviable a position. Several, including Russia, also have buffer funds to reduce the effects of Dutch disease in their economies. But the difference is that Norway treats its fund as sacred while Moscow readily dips into its own when it needs extra cash.

According to Norway's central bank, the net oil revenues of both Norway and Russia averaged around 15 percent of GDP during that time between 1998 and 2013. However, while the total Norway had accumulated in its fund by 2013 amounted to about 200 percent of its annual GDP, the total in Russia's fund equaled just 20 percent of annual GDP.

How did Norway become so effective at managing its oil wealth?

Some of the answer lies in Norway's history as a small nation with egalitarian traditions that go back as far as the Viking age, when groups of free men banded together under a charismatic leader to take part in sea trading and raiding expeditions and then share the profits.

Knud Knudsen, a sociologist at Stavanger University, says that such traditions, reinforced by laws during the industrial age to ensure the sharing of natural resources, like waterfalls, helped give rise to today's society, which puts much emphasis on social programs that equally benefit all citizens. But he says that it is all made possible by the fact that Norwegians have a high level of trust in their fellow citizens and those they elect to hold office.

Norway routinely tops surveys ranking the world's countries in citizens' trust in their government and institutions as well as for general contentment with their lives.

That could mean that the Norwegian model would not work as well in many countries where there is a less strong sense of social contract. But Norway's experience could still provide some valuable lessons.

Kasim, the international oil consultant, says the trick for other countries, particularly emerging economies, is not to try to save as much oil income as Norway does. Instead, many countries need to invest in infrastructure if they are to grow. They may also need to create stabilization funds to protect their still undiversified economies from wild swings in the price of oil.

But, he says, they will have to learn to save, not spend, much of their oil wealth if they are to protect themselves against Dutch disease and give other nonoil sectors the chance to grow and employ more people.

What happens when they do not, he notes, is called the "oil curse." Countries become so fully dependent upon their oil income that all other business dies and their rulers stay in power through handouts to loyalists and crackdowns on opponents.

In the worst case, the oil finally becomes a prize for one powerful group to try to wrest from another, until the once oil-rich state becomes a failed state and there are no winners, only losers.