A federal agency’s recommendations on how to protect endangered and threatened marine species, including the Rice’s whale, Gulf sturgeon, and loggerhead sea turtles, from the effects of oil and gas drilling in the Gulf of Mexico violate federal law, in part because they discount the potential for a repeat of the 2010 BP Deepwater Horizon oil spill, a federal judge ruled Monday.