AUSTRHEIM, Norway — Oil and gas made Norway one of the world’s most advanced and prosperous countries in just a few decades. Now the deadly siege in Algeria has fired up a debate here over how far its petroleum companies, and their skilled workers, should go in the hunt for resources and profits.

In recent days, the energy giant Statoil has confirmed the deaths of four of the five company employees missing since Islamist militants attacked a gas installation this month at In Amenas, near the Libyan border. Few in Norway held out more than the slimmest hope for the last missing employee.

This sparsely populated region on the North Sea coast, where on winter afternoons children skate on frozen ponds nestled among snow-covered evergreens, might seem to have little in common with the barren Sahara. But the flare of burning gas in the distance at the Mongstad refinery, Norway’s largest, serves as a reminder of why four people from the area found themselves among the 17 Statoil employees at the Algerian facility when it was ambushed.

Since Phillips Petroleum struck oil in 1969 in the Ekofisk field in the North Sea, more and more Norwegians from this coastal region have passed up traditional jobs like fisherman and sailor to become the mechanics and engineers powering the petroleum industry — not just in Norway but also from the Gulf of Mexico to Nigeria.