Barack Obama has permanently banned new oil and gas drilling in most US-owned waters in the Arctic and Atlantic oceans, a last-ditch effort to lock in environmental protections before he hands over to Donald Trump.

Obama used a 1953 law that allows presidents to block the sale of new offshore drilling and mining rights and makes it difficult for their successors to reverse the decision.

However, Obama’s ban – affecting federal waters off Alaska in the Chukchi Sea and most of the Beaufort Sea and in the Atlantic from New England to the Chesapeake Bay – is unprecedented in scale and could be challenged by Trump in court.

The president-elect has vowed to unleash the country’s untapped energy reserves and exploit fossil fuels. He has previously questioned the science of climate change, threatened to tear up the Paris climate agreement and appointed climate-change deniers in his cabinet.

This has led to a scramble from environmentalists calling on Obama to impose whatever regulations and executive orders he can to protect his climate legacy.

Tuesday’s move came in a joint announcement by Obama and the Canadian prime minister, Justin Trudeau, who also put a moratorium on new oil and gas leasing in its Arctic waters, subject to periodic review.

Obama, currently on holiday in Hawaii and with only a month left in office, said in a statement: “These actions, and Canada’s parallel actions, protect a sensitive and unique ecosystem that is unlike any other region on earth. They 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.

“By contrast, it would take decades to fully develop the production infrastructure necessary for any large-scale oil and gas leasing production in the region – at a time when we need to continue to move decisively away from fossil fuels.”

In 2015, just 0.1% of US federal offshore crude production came from the Arctic. A Department of Interior analysis shows that, at current oil prices, significant production in the Arctic will not occur. “That’s why looking forward, we must continue to focus on economic empowerment for Arctic communities beyond this one sector,” the statement said.

Campaigners welcomed the announcement. Jacqueline Savitz, a senior vice-president at the advocacy group Oceana told the Associated Press: “This decision will help protect existing lucrative coastal tourism and fishing businesses from offshore drilling, which promises smaller, short-lived returns and threatens coastal livelihoods.

“The people of the Atlantic coast refused to allow their way of life to be compromised and we commend their hard work making their voices heard in Washington.”

Few energy companies have expressed a wish to drill any time soon off the coasts thanks to abundant cheap shale oil in North Dakota and Texas. Exploratory drilling in the Arctic is costly and risky.

But with Trump in the White House, the obscure law could face a challenge. Dan Naatz of the Independent Petroleum Association of America told the Associated Press: “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.”

And Erik Milito, upstream director at the American Petroleum Institute, told Reuters: “We are hopeful the incoming administration will reverse this decision as the nation continues to need a robust strategy for developing offshore and onshore energy.”

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.