New oil and gas drilling in parts of the U.S. Atlantic and Arctic oceans have been blocked by U.S. President Barack Obama, bringing disappointment to the oil and gas sector less than a month before he leaves office.

The federal government announced Dec. 20 that mineral extraction is no longer allowed on 3.8 million acres in the north and mid-Atlantic Ocean as well as 115 million acres in the Arctic Ocean. The move comes in an effort to “preserve critical ecological hot spots, helping to protect habitats important to Atlantic fisheries” while providing long-term opportunities for research and exploration, the U.S. Department of Interior said in a statement.

The Independent Petroleum Association of America (IPAA) called it a “last-minute decision” that will hurt communities in need of affordable U.S. energy.

“Instead of building on our nation’s position as a global energy leader, today’s unilateral mandate could put America back on a path of energy dependence for decades to come,” Dan Naatz, senior vice president of government relations and political affairs for the IPAA, said in a statement. “We disagree with this last-minute political rhetoric coming from the Obama Administration and contest this decision by the outgoing administration as disingenuous.”

Naatz called the president’s actions “puzzling,” considering oil and gas demand is forecast to grow until 2040.

The ban comes as the U.S. prepares to bring a new president into office—one that is seen by some industry analysts as being a friend to the oil and gas industry. President-elect Donald Trump’s administration picks include ExxonMobil CEO Rex Tillerson as secretary of state and Texas Gov. Rick Perry as secretary of energy.

Trump had not released a statement or tweet on the issue as of 4 p.m. CST

Canadian Prime Minister Justin Trudeau joined Obama in the action.

Obama said in a statement on Dec. 20 that the joint actions “reflect the scientific assessment that, even with the high safety standards that both our countries have put in place, the risks of an oil spill in this region are significant and our ability to clean up from a spill in the region's harsh conditions is limited.”

Canada will designate all Arctic Canadian waters as indefinitely off limits to future offshore Arctic oil and gas licensing, to be reviewed every five years through a climate and marine science-based life-cycle assessment.

The law under which Obama is acting enables a president to withdraw certain areas from leasing or drilling “for any public purpose,” such as to limit the impacts of climate change, according to a legal briefing by the Natural Resources Defense Council and Earth Justice.

Under that law, a president is not authorized to "undo" a previous withdrawal, making it more difficult for Trump to target without a lawsuit.

The American Petroleum Institute oil industry group disagreed about the permanence of the ban and said Trump could likely use a presidential memorandum to lift the ban. Erik Milito, API's upstream director, said the ban takes the U.S. in the wrong direction.

“Blocking offshore exploration weakens our national security, destroys good-paying jobs, and could make energy less affordable for consumers,” Milito said. “Fortunately, there is no such thing as a permanent ban, and we look forward to working with the new administration on fulfilling the will of American voters on energy production.”

Similar sentiments were shared by the Consumer Energy Alliance (CEA) and the National Ocean Industries Association (NOIA).

CEA President David Holt said the president’s action “defies the will of the American people, who in poll after poll have expressed their strong support for offshore energy development.”

NOIA President Randall Luthi said the move puts the U.S. at a “competitive disadvantage.”

“While other countries are ramping up offshore oil and natural gas exploration in the Arctic and in the Atlantic Basin, President Obama has benched the United States,” Luthi said.

Arctic energy activity is moving forward in other parts of the world, including Russia and Norway.

Luthi added that having a “robust offshore leasing program is crucial not only to meeting America’s domestic energy needs, but to providing an affordable, reliable and safe source of oil and natural gas to developing nations.”

The withdrawal includes the U.S. Chukchi Sea and parts of the U.S. Beaufort Sea, which the Interior Department said will protect fragile offshore ecosystems.

In 2015, just 0.1% of U.S. federal offshore crude production came from the Arctic. At current oil prices, significant production in the Arctic will not occur, according to a federal analysis.

There is currently no crude oil production in the Canadian Arctic. A number of companies including Chevron Corp. (NYSE: CVX), ConocoPhillips (NYSE: COP) and Imperial Oil hold exploration licenses, but all three have put their drilling plans on hold, partly because of weak global oil prices.

Amid regulatory and environmental scrutiny as well as high costs, Royal Dutch Shell Plc (NYSE: RDA.S) halted drilling in the U.S. Arctic in 2015.

On the U.S. Atlantic coast, local groups have opposed offshore drilling and vowed to fight the Trump administration's attempts to open it up.

Industry groups have argued in favor of opening Atlantic waters to oil and gas drilling. Earlier this year, the federal government removed the Mid- and South Atlantic regions from Virginia to Georgia from offshore lease consideration through 2020.

RELATED: US Finalizes Drilling Regulations In Arctic Outer Continental Shelf

RELATED: Will America Reverse An Offshore Oil And Gas Agenda Gone Adrift?

RELATED: Feds Nix Atlantic From Five-year Offshore Lease Plan

Velda Addision can be reached at vaddison@hartenergy.com. Reuters contributed to this article.