A federal judge declared late last month that President Trump’s executive order removing a previous ban on oil and gas drilling in the Arctic Ocean and parts of the Atlantic Ocean was illegal. The ruling, by Judge Sharon L. Gleason of the U.S. District Court for Alaska, reinstates a ban on energy exploration for millions of acres of federal waters, dealing a blow to Trump’s intent to increase offshore oil and gas development.

The Trump administration had announced the largest planned expansion of offshore drilling in decades, in the Atlantic, Arctic…