President Obama announced on Tuesday what he called a permanent ban on offshore oil and gas drilling along wide areas of the Arctic and the Atlantic Seaboard as he tried to nail down an environmental legacy that cannot quickly be reversed by Donald J. Trump.

Mr. Obama invoked an obscure provision of a 1953 law, the Outer Continental Shelf Lands Act, which he said gives him the authority to act unilaterally. While some presidents have used that law to temporarily protect smaller portions of federal waters, Mr. Obama’s declaration of a permanent drilling ban on portions of the ocean floor from Virginia to Maine and along much of Alaska’s coast is breaking new ground. The declaration’s fate will almost certainly be decided by the federal courts.

“It’s never been done before,” said Patrick Parenteau, a professor of environmental law at Vermont Law School. “There is no case law on this. It’s uncharted waters.”

The move — considered creative by supporters and abusive by opponents — is one of many efforts by Mr. Obama to protect what environmental policies he can from a successor who has vowed to roll them back. The president, in concert with United Nations leaders, rushed countries to ratify the Paris Agreement on climate change, putting the multinational accord into force in record time, before Mr. Trump’s inauguration.