New Zealand has banned all new permits for offshore oil and gas exploration, the government has announced.

The change in direction, which faced furious opposition by industry groups, was hailed as an example of “bold global leadership” by environmental campaigners.

Prime minister Jacinda Ardern said it would help “protect future generations from climate change” and promised nobody would be losing their job as a result.

“Unless we make decisions today that will essentially take effect in 30 or more years’ time, we run the risk of acting too late and causing abrupt shocks to communities and our country,” she said at a press conference on Thursday.

The move, however, will not affect existing permits for exploration or extraction, meaning the industry will likely be operational for several more decades.

Ms Ardern, who is the world’s youngest female head of government, has pledged to go green by reducing the country’s net greenhouse gas emissions to zero by 2050.

Her government plans to plant 100 million trees each year and ensure the electricity grid runs entirely from renewable energy.

James Shaw, the New Zealand Green Party’s co-leader and climate change minister, praised the move as “the nuclear-free moment of our generation” – a reference to a 1984 ban on nuclear-armed ships entering New Zealand’s waters.

Greenpeace New Zealand’s executive director, Russel Norman, said: “The tide has turned irreversibly against big oil in New Zealand.

“Today’s announcement is significant internationally too. By ending new oil and gas exploration in our waters, the fourth largest exclusive economic zone on the planet is out of bounds for new fossil fuel exploitation. New Zealand has stood up to one of the most powerful industries in the world.

“Bold global leadership on the greatest challenge of our time has never been more urgent and Ardern has stepped up to that climate challenge.”

Voters last year elected a liberal coalition government, headed by Ms Ardern, following nine years of conservative leadership that favoured expanding the oil industry.

Filmmakers use 100-year-old photograph to map effect on climate change on a glacier

The oil and gas industry is relatively small in New Zealand, employing about 11,000 people and accounting for about 1 per cent of the overall economy. It is dwarfed in importance by farming and tourism.

But the industry is important to the Taranaki region, where most of the activity is centered. New Plymouth mayor Neil Holdom told Radio New Zealand the move was a “kick in the guts for the future of the Taranaki economy”.

10 photographs to show to anyone who doesn't believe in climate change Show all 10 1 /10 10 photographs to show to anyone who doesn't believe in climate change 10 photographs to show to anyone who doesn't believe in climate change A group of emperor penguins face a crack in the sea ice, near McMurdo Station, Antarctica Kira Morris 10 photographs to show to anyone who doesn't believe in climate change Floods destroyed eight bridges and ruined crops such as wheat, maize and peas in the Karimabad valley in northern Pakistan, a mountainous region with many glaciers. In many parts of the world, glaciers have been in retreat, creating dangerously large lakes that can cause devastating flooding when the banks break. Climate change can also increase rainfall in some areas, while bringing drought to others. Hira Ali 10 photographs to show to anyone who doesn't believe in climate change Smoke – filled with the carbon that is driving climate change – drifts across a field in Colombia. Sandra Rondon 10 photographs to show to anyone who doesn't believe in climate change Amid a flood in Islampur, Jamalpur, Bangladesh, a woman on a raft searches for somewhere dry to take shelter. Bangladesh is one of the most vulnerable places in the world to sea level rise, which is expected to make tens of millions of people homeless by 2050. Probal Rashid 10 photographs to show to anyone who doesn't believe in climate change Sindh province in Pakistan has experienced a grim mix of two consequences of climate change. “Because of climate change either we have floods or not enough water to irrigate our crop and feed our animals,” says the photographer. “Picture clearly indicates that the extreme drought makes wide cracks in clay. Crops are very difficult to grow.” Rizwan Dharejo 10 photographs to show to anyone who doesn't believe in climate change Hanna Petursdottir examines a cave inside the Svinafellsjokull glacier in Iceland, which she said had been growing rapidly. Since 2000, the size of glaciers on Iceland has reduced by 12 per cent. Tom Schifanella 10 photographs to show to anyone who doesn't believe in climate change A river once flowed along the depression in the dry earth of this part of Bangladesh, but it has disappeared amid rising temperatures. Abrar Hossain 10 photographs to show to anyone who doesn't believe in climate change A shepherd moves his herd as he looks for green pasture near the village of Sirohi in Rajasthan, northern India. The region has been badly affected by heatwaves and drought, making local people nervous about further predicted increases in temperature. Riddhima Singh Bhati 10 photographs to show to anyone who doesn't believe in climate change A factory in China is shrouded by a haze of air pollution. The World Health Organisation has warned such pollution, much of which is from the fossil fuels that cause climate change, is a “public health emergency”. Leung Ka Wa 10 photographs to show to anyone who doesn't believe in climate change Water levels in reservoirs, like this one in Gers, France, have been getting perilously low in areas across the world affected by drought, forcing authorities to introduce water restrictions. Mahtuf Ikhsan

Opposition MP Jonathan Young described the move as “economic vandalism”. “This decision is devoid of any rationale. It certainly has nothing to do with climate change,” he said. “These changes will simply shift production elsewhere in the world, not reduce emissions.”

The Petroleum Exploration and Production Association branded it a “lose-lose” for New Zealand’s economy.

The idea of an expansion in offshore drilling has proved contentious in New Zealand, particularly after problems elsewhere such as the 2010 Deepwater Horizon oil spill in the Gulf of Mexico.

The announcement does not apply to onshore exploration permits. The government said those would continue for the next three years and be reviewed after that.