The US Navy has agreed to limit its use of sonar that may inadvertently harm whales and dolphins in waters near Hawaii and California.
A federal judge in Honolulu signed the deal between the Navy and environmental groups on Monday.
It restricts or bans the use of mid-frequency active sonar and explosives used in training exercises.
Campaigners say that sonar disrupts the feeding of marine mammals, and can even cause deafness or death.
An explosives training exercise in San Diego four years ago killed four dolphins, Earthjustice lawyer David Henkin said when announcing the agreement.
He said the deal means:
- The Navy cannot use sonar in a well-known habitat for beaked whales between Santa Catalina Island and San Nicolas Island
- Sonar is banned in a blue whale feeding area near San Diego
- Sonar and explosives training is banned on the eastern side of the Big Island in Hawaii
- The number of major training exercises between Maui and the Big Island will be set
- Any injuries or deaths will be investigated by the National Marine Fisheries Service
The hope, said Mr Henkin, is that these safe havens will bring down the number of injuries and deaths to marine wildlife.
Mass strandings of whales are often blamed on sonar driving the mammals ashore by emitting some sort of traumatising signal.
The deal brings to an end legal cases launched by Earthjustice and other environmental groups against the fisheries service for allowing the military training.
Lt Cmdr Matt Knight, a US Pacific Fleet spokesman, said the deal would not undermine the Navy's key testing and training requirements.
"Recognising our environmental responsibilities, the Navy has been, and will continue to be, good environmental stewards as we prepare for and conduct missions in support of our national security," he said.