KRAFLA, Iceland — Soon after work began here on a power plant to harness some of the vast reserves of energy stored at the earth’s crust, the ground moved and, along a six-mile-long fissure, began belching red-hot lava. The eruptions continued for nine years, prompting the construction of a stone and soil barrier to make sure that molten rock did not incinerate Iceland’s first geothermal power station.

While the menacing lava flow has long since stopped and Krafla is today a showcase of Iceland’s peerless mastery of renewable energy sources, another problem that has dogged its energy calculations for decades still remains: what to do with all the electricity that the country — which literally bubbles with steam, hot mud and the occasional cloud of volcanic ash — is capable of producing.

In a nation with only 320,000 people, the state-owned power company, Landsvirkjun, which operates the Krafla facility, sells just 17 percent of its electricity to households and local industry. The rest goes mostly to aluminum smelters owned by the American giant Alcoa and other foreign companies that have been lured to this remote North Atlantic nation by its abundant supply of cheap energy.

Now a huge and potentially far more lucrative market beckons — if only Iceland can find a way to transmit electricity across the more than 1,000 miles of frigid sea that separate it from the 500 million consumers of the European Union. “Prices are so low in Iceland that it is normal that we should want to sell to Europe and get a better price,” said Stein Agust Steinsson, the manager of the Krafla plant. “It is not good to put all our eggs in one basket.”