Blue and beaked whales' behaviour is disturbed by simulated navy sonar, according to two published studies.
In two experiments, teams of researchers managed to attach tracking and sound-recording tags to 17 blue whales and two beaked whales.
They then played simulated sonar sound through an underwater speaker and measured the animals' responses.
Researchers have previously linked mass strandings and deaths of beaked whales around the world to military exercises using what is known as mid-frequency sonar. So scientists have been keen to understand if the sound harmed the animals.
The new study does not explain those strandings - the chain of events that leads to these remains unclear.
But marine mammal expert Patrick Miller, from the University of St Andrews' Sea Mammal Research Unit (SMRU), who was not involved with the new study, said the results showed it would be wise for naval exercises to "avoid critical habitat areas".
The beaked whale study was led by scientists also from the SMRU.
It revealed what researchers had long suspected, that man-made sound had a negative effect on these deep-diving whales. Beaked whales use sound to hunt as well as to communicate. They produce echolocation clicks as they dive up to 1.5km (1mi) in depth, picking up echoes that bounce off the bodies of the squid they are hunting.
When the scientists played the sonar sounds during their experiments, both of the tagged Cuvier's beaked whales stopped hunting and "swam rapidly, silently away".
Perhaps more surprising was that, in the other study, led by Jeremy Goldbogen from the Cascadia Research Collective in the US state of Washington, several blue whales also responded to the sound.
Blue whales communicate with very low-frequency sound - far below that of naval sonar. And because they do not use sound to hunt, the scientists thought they would not be affected.
Yet the whales' responses did vary.
Animals that were feeding close to the surface showed almost no response, but animals that were diving for krill - rather than sifting the surface waters - reacted very differently.
"One animal was diving and feeding repeatedly all throughout the day," recalled Dr Goldbogen.
"And as soon as the sound started, the animal stopped feeding and maintained a directed heading and moved away from the sound source."
These vast animals can scoop up half a million calories' worth of krill in one gulp as they dive, so disturbing their feeding deprives them of large amounts of energy.
"I calculated that in that time, the animal lost a metric tonne of krill," said Dr Goldbogen.
"So if this happens a lot in these feeding hotspots, that could have real consequences."
And currently, naval exercises are carried out in these hotspots.
The blue whales in this study, for example, were feeding in the in-shore waters of California during the summer and autumn of 2010. The study area is where the US Navy carries out regular exercises and where the whales come to build up fat stores for the long migration to their breeding grounds.
Even subtle disturbance to this vital pre-migration gorge, said Dr Goldbogen, "could have real consequences for the population health".
"These are the biggest animals that have ever lived, so they need a huge amount of food," he added.
The detailed examination of the whales' behaviour was made possible by the technology contained within the tracking tags.
"A lot of the same sensors that are in our smartphones are in the tags we attached to these whales," said Dr Goldbogen.
"When you rotate your phone and the screen moves with you, that's because there are these sensors called accelerometers and magnetometers.
"That's how we get the information about the position of the whale."
This resulted in detailed animations of each whale's position, speed and movement.
But to actually put a tag onto one of these giant mammals involved a chase.
The tags are attached using suction cups, so the researchers had to use a small boat to move alongside each whale, while one member of the team used a long carbon fibre pole to "tap" the tag onto the animal's back.
"It's a lot easier in blue whales than some other whales, because they're so big," said Dr Goldbogen.
"We can programme the tag to release, so we find the tag and download the data."
This is a far trickier exercise with beaked whales, which are smaller and dive for an hour at a time.
"If you see a beaked whale and if you don't get the tag on it, you might never see it again," said Dr Goldbogen.
Although both studies provide clear evidence that sonar affects these rare marine mammals, the scientists say much more research is needed into the specific impacts of human activity on their environment.
Dr Miller commented: "Further research on the possible long-term impacts of these effects is needed, to evaluate whether more protection measures are required."
Dr Goldbogen concluded: "We didn't expect blue whales to have a strong response, so there's clearly a dearth of basic data on how animals respond to man-made sound.
"These animals have evolved in a very different environment to the one they're living in today."