Blue whales and beaked whales will alter diving patterns or avoid important feeding areas when exposed to the sort of underwater sonar noise produced during U.S. military exercises, according to research in two newly published studies.

The revelation comes after researchers with the Southern California Behavioral Response Study exposed blue whales in the California Bight to mid-frequency (3.5-4 kHz) sonar sounds significantly less intense than the military uses.

"Whales clearly respond in some conditions by modifying diving behavior and temporarily avoiding areas where sounds were produced," lead author Jeremy Goldbogen of Cascadia Research said in a statement. "But overall the responses are complex and depend on a number of interacting factors," including whether the whales were feeding deep, shallow or not at all.

Speaking the BBC, Goldbogen said it was surprising that blue whales were observed reacting so adversely to the sonar noise.

"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," he said.

"These animals have evolved in a very different environment to the one they're living in today."

Blue whales, the largest creatures on Earth, can consume as many as half a million calories worth of krill in one gulp, and if their diving and feeding patterns are disturbed, it could deprive them of huge amounts of much-needed energy.

"And as soon as the sound started, the animal stopped feeding and maintained a directed heading and moved away from the sound source," Goldbogen told BBC.

"I calculated that in that time, the animal lost a metric ton of krill. So if this happens a lot in these feeding hotspots, that could have real consequences."

To track the whales, scientists used a non-invasive tagging device that attached to the whale with a suction cup. Inside the tracking device were accelerometers and magnetometers, sensors similar to what's found in a smartphone. The sensors provided valuable on movement.

"The tag technology we use offers a unique glimpse into the underwater behavior of whales that otherwise would not be possible," said Ari Friedlaender, a research scientist at the Duke Marine Laboratory.

Not all whales responded to the sonar noise in the same way. Some moved away from it or stopped eating, and some did not respond at all.

In a separate study of beaked whales, researchers found that the cetaceans respond to sonar noise even more noticeably than blue whales.

The blue whale study is published in the journal Proceedings of the Royal Society B; the beaked whale study is published in the journal Biology Letters.