A federal judge on Friday ruled President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE’s executive order seeking to revoke an Obama-era ban on oil and gas drilling in the Arctic and Atlantic oceans was unlawful.

U.S. District Judge Sharon Gleason said in a ruling that the Obama administration’s leasing withdrawals of about 120 million acres of the waters "will remain in full force and effect unless and until revoked by Congress."

ADVERTISEMENT

Gleason wrote that Trump’s 2017 order revoking the drilling ban "is unlawful, as it exceeded the president’s authority."

Former President Obama issued the drilling ban in his second term by way of the Outer Continental Shelf Lands Act, which allows presidents to instate leasing withdrawals but does not allow presidents to revoke such withdrawals without approval from Congress, according to The Washington Post.

Erik Grafe, the lead attorney from Earthjustice, which argued for the previous administration’s leasing withdrawals to be reinstated in the case, said the ruling shows that "President Trump’s lawlessness is catching up with him."

"The judge’s ruling today re-affirms that we are a nation of laws and shows that the president cannot just trample on the constitution at the expense of our oceans, wildlife, and climate," he added in a statement.

According to the Post, Friday’s ruling marks the third legal blow against the Trump administration’s energy policies this week.

Earlier on Friday, Gleason also blocked a land swap arranged by the Interior Department that aimed to have a road constructed through Izembek National Wildlife Refuge in Alaska.

U.S. District Judge Lewis T. Babcock also ruled earlier this week that two gas drilling plans in Colorado that were approved by the Bureau of Land Management and U.S. Forest Service were also illegal, according to the newspaper.