Beneath the road on a snow-dusted mountain in the Hellisheiði region of southwest Iceland, a river of boiling water flows through porous, volcanic rock. Above, thick steel pipes connect to geodesic domes, each of which houses a geothermal well.

Steinþór Níelsson, a senior geologist with ISOR (Iceland Geosurvey), parks his car near one of the rounded huts. He and his team analyze rock samples taken from boreholes to figure out the best way to drill, and then track how the supply of hot water is affected by tapping its steam, which is used to create electricity for this area, as well as the capital, Reykjavik.

Formed 60 million years ago, Iceland is the youngest country on Earth, and it's still growing. The North American and Eurasian tectonic plates form a thick seam up the Arctic country that's pulling apart, releasing fresh magma one ripped stitch at a time.

The repercussions are epic: volcanic eruptions, earthquakes and a massive geothermal resource that, over the past century, has transformed Iceland from impoverished nation to the 15th-richest country in the world. While the rest of Europe worries about turning down the heat or turning back to coal, Icelanders enjoy risibly low energy bills and an enviable quality of life, thanks to an abundance of water, most of which is scalding hot.

Today, every home in Iceland is heated with renewable energy: 90% from district heating systems that tap hot water directly underground and 10% from electricity generated either using steam from that water or hydropower. One hundred percent of the country's electricity is also renewable.

Getting there was neither easy nor cheap. Voters needed to be persuaded to abandon coal, funds raised for new infrastructure, technologies created and then embraced. A big part of Iceland's success comes down to leverage, Níelsson said.

It's taken almost a century, but the country has managed to maximize the social benefits of renewable energy, as well as the economic and environmental ones. Once thick with smog, the air over Reykjavik is now crystal clear. Homes are toasty, heated by naturally boiling water that's also used to warm the many outdoor swimming pools Icelanders consider essential during the cold, dark winters.

"In England, you go to the pub after work," Níelsson says. "Here, you sit in a hot tub, 38 or 40 degrees, and discuss the news and politics and football. This is where a lot of community is taking place."

There are lessons here for other countries about the benefits of bold investments in renewable energy. And even countries not sitting on active volcanoes may be able to use lower-temperature geothermal energy, says Gabriel Malek, chief of staff at Fervo Energy, a geothermal technology company based in Houston. The key is how deep you need to drill, and whether the rock is permeable. "You don't need to be in the Goldilocks situation to have geothermal deployed at scale."

A short drive from the mountain in Iceland, the overlapping benefits of abundant geothermal energy are on full display at the Hellisheiði Power Station. Surrounded by hills, its glassy, triangular visitors center rises, volcano-like, from a hardened lake of moss-covered lava; bumpy-black basalt softened by luminous, velvety green. The area doubles as a recreational site; hiking trails weave through the geothermal field and Icelandic horses carry riders on valley treks beside the network of zigzagging green-painted pipes carrying hot water to Reykjavik.

The plant itself is a tourist attraction, complete with a gift shop. It's also the cornerstone of a high-tech incubator, powering a cluster of businesses on-site that, in turn, are doing their own work to decarbonize the planet. The world's first direct carbon capture facility, called Orca, is here, built by Swiss startup Climeworks. Its fat cigar-shaped filters quiver in the wind like something out of Dr. Seuss as they suck in what looks like crystal clear sub-arctic air. Because of the way invisible greenhouse gases swiftly disperse, it's as likely to contain the C02 from a fleet of New York taxis or a Mumbai factory.

The problem of what to do with all that hoovered-up carbon is solved by another expanding business on-site, Carbfix. It takes most of Orca's captured carbon and injects it deep into Iceland's porous underground rock, using the same pipes and injection wells used by the power plant to return spent brine into the ground after it's used to generate electricity.

There's an algae farm here as well, Vaxa Technologies, that borrows the power plant's water, and repurposes some of its carbon emissions, to produce sustainable human and fish food. And, just a short drive from Hellisheiði, the same geothermal energy is used to heat a cluster of eight greenhouses in the small town of Reykir. Renewable power has proved key to bolstering Iceland's food security: Despite cold winters with as little as five hours of daylight, the country manages to grow all of the cucumbers and 60% of tomatoes used domestically.

Twenty-five percent of Europeans live in areas that could benefit from geothermal power, says Jack Kiruja, a geothermal analyst with the International Renewable Energy Agency. But while more countries are following Iceland's lead, none have been as successful in fully exploiting their geothermal resources, he says. Iceland has clear geothermal regulations, policies that reduce the economic risk of drilling and robust training programs to build technical expertise. All of this means a typical Icelandic geothermal power station can create more jobs, per capita GDP, and socioeconomic benefits, he says.

Iceland's energy transition began almost a century ago, during a period that has parallels to today. Amid heightened European tensions, a global Depression, and rising energy insecurity, officials made the risky decision to wean the capital off coal by tapping geothermal.

Starting in the 1930s, voters had to be convinced the long-term benefits would be worth the immediate costs. Foreign loans were secured to pay for the initial infrastructure serving Reykjavik. In the 1960s, when smaller municipalities balked at the cost of exploration and drilling, a National Energy Fund was created to assume the financial risk. When the global energy crisis struck in 1973, and inflation soared, Iceland doubled down, extending geothermal energy, as well as hydro electricity. In 2008, as the country's banking system collapsed, it was the clean energy economy that helped people survive. Today, the country's biggest challenge is its success. As the rest of the world looks to decarbonize, interest from foreign companies keen to set up operations in Iceland for cheap, renewable power far exceeds the country's current capacity.

"This is the only time in the history of Iceland that foreign investment is knocking at our door. We have usually been knocking at their door," says Guðlaugur Þór Þórðarson, head of the Environment, Energy and Climate Ministry. "Most of them are looking for the same thing: green energy."

The good news is, unlike in the 1930s, there is broad political consensus on the need to build more renewable power capacity. "There's general support that we need to move forward because it's a climate issue, it's an energy security issue and it's a business issue," says Halla Hrund Logadóttir, director general of Iceland's National Energy Authority.

But securing buy-in from the public has proved trickier in recent years. People have become increasingly protective of the natural beauty that surrounds them, including the unmarred Game of Thrones landscape that attracts so many tourists. Officials say it's harder to win local support for new hydro and geothermal plants, and resistance to early proposals for wind farms has been strong.

Inside the Ministry of the Environment, Energy and Climate, in Reykjavik, Þórðarson keeps an original poster from the 1938 municipal election on his office wall. "Vote Geothermal" it urged Icelanders, as part of a PR campaign that promised hot water in kitchens, fresh produce and the end of smog.