When whales first took the plunge into the ocean from land about 45 million years ago, they lacked the ability to echolocate — that is, to find and identify objects by emitting and bouncing sounds off them, much as bats do.

About 7 million years later, toothed whales (sperm whales are a type of toothed whale) developed this ability, fossils show.

Some marine biologists think that sonar in toothed whales came about as a better way to find food in the darkness of the deep ocean. But how did the whales, which primarily ate fish, know there was a large supply of food down in the dark?

• Click here to visit FOXNews.com's Natural Science Center.

Researchers at the University of California, Berkeley, suggest that giant squid would bump into the whales as the squid migrated from the dark depths to the surface at night, something they've been doing for about 200 million years.

"When whales developed sonar," explained researcher Nick Pyenson of the University of California, Berkeley, "it allowed them to dive deeper and follow the squids into the very dark ocean depths, where they discovered a rich food source that was accessible 24 hours day."

Cephalopods, such as squid, are the most abundant and high-energy resource in the ocean and are eaten by 90 percent of all toothed whales.

The researchers detailed their idea in the European journal Lethaia.

The development of echolocation in whales and bats are strong examples of how two very different species evolved similar adaptations to their environment and passed it down to succeeding generations, a process known as convergent evolution, Pyenson noted.

"With convergent evolution, we see the same solution for being able to chase after your prey in the dark," Pyenson said, "whether you're a bat or a whale."

Copyright © 2007 Imaginova Corp. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.