The US navy has won the latest round in a court battle over whether it can use sonar equipment which environmentalists say can kill whales and other mammals.
The US Navy says it has not seen any whale injuries caused by sonar
An appeals court overturned a decision banning the use of sonar equipment in tests to be held off California.
National security needs must be weighed against protecting the safety of marine mammals, the judges ruled.
Wildlife experts say noise pollution from sonar disorients whales, causing them to become stranded on beaches.
The navy argued that it had monitored waters off southern California for 40 years and had not seen any whale injuries from the use of sonar equipment.
It says the device is necessary to track submarines.
The ruling the latest stage of a long-running battle between environmentalists and the US Navy over marine safety.
In a split decision, the 9th US Circuit Court of Appeals reversed a two-year ban on the equipment ordered in earlier August, in a case brought by a coalition of animal welfare groups.
It criticised the navy for not taking action to minimise harm done to whales during exercises in California, but said the district court that had imposed the ban had not proven that the move would prevent "irreparable harm to the environment".
"The public does indeed have a very considerable interest in preserving our natural environment and especially relatively scarce whales," Judge Andrew Kleinfeld wrote in the ruling.
"But it also has an interest in national defence. We are currently engaged in war, in two countries."
In 2006, a UK government-commissioned report called for more research into the effects of noise pollution on marine animals.
It concluded that there were many noise sources in the seas, including seismic surveys for oil and gas, shipping, offshore wind farms, military sonar and scientific research.
The study identified 13 cases of strandings by whales and dolphins that appeared to be linked to noise, adding that most of the cases did involve naval vessels.