That action by the Obama Administration prompted strong criticism from some Alaska politicians and oil companies that wanted to drill there.

Ten environmental groups, including Greenpeace, the League of Conservation Voters, Sierra Club and The Wilderness Society, filed suit to block Trump’s executive order. Defending the order were the Trump administration, the American Petroleum Institute and the state of Alaska.

Gleason ruled Friday that the Outer Continental Shelf Lands Act only allows a president to withdraw lands from consideration by the Interior Department for leasing — not to revoke a prior withdrawal. She ruled Congress is the only institution that can reverse a president’s decision with regard to this matter, saying Trump’s executive order “is unlawful, as it exceeded the President’s authority.”

“The wording of President Obama’s 2015 and 2016 withdrawals indicates that he intended them to extend indefinitely, and therefore be revocable only by an act of Congress,” Gleason said.

Gleason added the withdrawals in 2015 and 2016 “will remain in full force and effect unless and until revoked by Congress.”

League of Conservation Voters president Gene Karpinski touted the environmentalist win in a statement marking the latest court ruling against a Trump administration environmental move.

“This victory shows that no one, not even Trump, is above the law,” Karpinski said in a statement. “Offshore drilling and the associated threat of devastating oil spills puts coastal economies and ways of life at risk while worsening the consequences of climate change. President Trump wanted to erase all the environmental progress we’ve made, but we fought back and we won.”

The League of Conservation Voters also said the ruling would force the Trump administration to re-examine its five-year leasing program for the Outer Continental Shelf.

An appeal to the Ninth Circuit Court of Appeals is considered likely in the case.