The appeals court ruled for environmental groups led by the Natural Resources Defense Council and rejected White House efforts to exempt the Navy from laws intended to protect marine mammals off the California coast .