The New Zealand government announced it will not grant any new deep-sea oil and gas exploration permits in an effort to combat the effects of climate change.

The decision doesn't affect 22 active offshore licenses with the last one set to finish in 2030. Those existing permits could then transition to mining permits which would allow up to a further 40 years of drilling, according to the government release Thursday.

"There will be no further offshore oil and gas exploration permits granted," said Prime Minister Jacinda Ardern. The left-of-center ruling coalition has described the move as "an important step to address climate change."

"We're striking the right balance for New Zealand — we're protecting existing industry, and protecting future generations from climate change," Ardern added.

France, Belize and Costa Rica are also set to place bans on either fossil fuel exploration or production, but none are considered as notable energy producers.

New Zealand produces oil and gas from all of its 22 licenses in the Taranaki Basin, a site just off the west coast of the North Island.

After receiving no warning of the decision, the reaction from fossil fuel organizations has been scathing.

The Petroleum Exploration & Production Association New Zealand (PEPANZ) Chief Executive Cameron Madgwick told state broadcaster Radio NZ there should have been consultation before the decision was made.

"It shows a complete misunderstanding by the government of how our industry works ... These are multi-decadal decisions, there are people here today that are looking forward to the future and what that might look like for their business," he said.

The New Zealand Oil and Gas Company said in a statement it had not been made aware of the policy which it said appeared to contradict pre-election promises.

Shares of that firm finished lower by 2.4 percent on the day to hit a six-month low. The wider NZX 50, which represents the country's top stocks, closed 0.59 percent lower.

Opposition politicians have also weighed in. The center-right National Party described the move as "economic vandalism" which made no environmental sense.

New Zealand had 40 percent of its 2016 energy supply coming from renewable sources, the fourth highest renewable share in the OECD (Organization for Economic Co-operation and Development) member countries.

Government figures suggest the country produced 908 petajoules of energy in 2016. That was made up of oil, gas, hydro, geothermal and other renewables.

From the same data set, it was calculated that the country managed to supply 78 percent of its energy needs.