In the final stretch of his term President Barack Obama is implementing new environmental protections that stand to thwart Donald Trump's agenda on oil and gas extraction in ways that may prove difficult for the president-elect to roll back.

The Obama administration announced on Tuesday that it will place an indefinite ban on offshore oil and gas drilling across large swaths of Atlantic and Arctic waters. The actions come in conjunction with news that Canada will implement a sweeping ban of its own, launching a set of actions to be reviewed every five years.

Related: Breaking the Ice: Obama Seeks to Cement Climate Change Legacy

"President Obama and Prime Minister [Justin] Trudeau are proud to launch actions ensuring a strong, sustainable and viable Arctic economy and ecosystem, with low-impact shipping, science based management of marine resources, and free from the future risks of offshore oil and gas activity," the White House said in a joint statement with the Canadian leader.

Tuesday’s announcement is just the latest example of Obama leveraging the waning days of his administration to stymie any future attempt to expand offshore drilling in the region.

Earlier in the year the Interior Department unveiled its five-year plan for offshore oil and gas drilling, notably omitting any expansion to specified regions in the Arctic. Together the results would likely slow the tide of President-elect Donald Trump’s pledge to expand production to reach untapped oil and gas reserves.

The latest action hinges on a provision of the 1953 the Outer Continental Shelf Lands Act, a law designed to protect coral reefs and marine sanctuaries. The seldom used measure allows the executive to permanently freeze offshore drilling in specified regions. Senior Obama administration officials stress that there is no provision in the law providing the president authority draw those actions back.

Environmental groups hailed the announcement as a major victory and symbolic milestone in ending offshore drilling in a region where it is exceedingly difficult to prevent and respond to potential oil spills.

Related: Obama Caps Environmental Legacy With Paris Climate Change Deal

"We are confident that this is an announcement that will stick. We have both the law and public opinion on our side,” Sierra Club executive director Michael Brune said.

There is currently no precedent for a president to hit rewind on bans against offshore drilling in the name of environmental protections. And because the actions are not up for review for another five years, advocacy groups say they are optimistic Trump will not be able to reverse the tide.

"No president has ever rescinded a previous president’s permanent withdrawal of offshore areas from oil and gas development," Marissa Knodel of the environmental group Friends of the Earth said in a statement. "If Donald Trump tries to reverse President Obama’s withdrawals, he will find himself in court."

Still allies in the oil and gas industry that while Obama's actions Tuesday are indefinite, it doesn't mean the ban will be in place for forever.

“Blocking offshore exploration would weaken our national security, destroy good-paying jobs, and could make energy less affordable for consumers,” Erik Milito, Upstream director at the American Petroleum Institute, said in a statement on Tuesday. “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.”