In the first edition of "The Origin of Species" in 1859, Charles Darwin speculated about how natural selection could cause a land mammal to turn into a whale. As a hypothetical example, Darwin used North American black bears, which were known to catch insects by swimming in the water with their mouths open:

"I can see no difficulty in a race of bears being rendered, by natural selection, more aquatic in their structure and habits, with larger and larger mouths, till a creature was produced as monstrous as a whale," he speculated.

The idea didn''t go over very well with the public. Darwin was so embarrassed by the ridicule he received that the swimming-bear passage was removed from later editions of the book.

Scientists now know that Darwin had the right idea but the wrong animal: instead of looking at bears, he should have instead been looking at cows and hippopotamuses.

The story of the origin of whales is one of evolution's most fascinating tales and one of the best examples scientists have of natural selection.

Natural selection

Darwin's theory of evolution by natural selection is one of the best substantiated theories in the history of science, supported by evidence from a wide variety of scientific disciplines, including paleontology, geology, genetics and developmental biology.

To understand the origin of whales, it's necessary to have a basic understanding of how natural selection works: It is the process by which organisms change over time as a result of changes in heritable physical or behavioral traits. Changes that allow an organism to better adapt to its environment will help it survive and have more offspring.

Natural selection can change a species in small ways, causing a population to change color or size over the course of several generations. This is called "microevolution."

But natural selection is also capable of much more. Given enough time and enough accumulated changes, natural selection can create entirely new species. It can turn dinosaurs into birds, apes into humans and amphibious mammals into whales.

Mutations

The physical and behavioral changes that make natural selection possible happen at the level of DNA and genes. Such changes are called "mutations."

Mutations can be caused by chemical or radiation damage or errors in DNA replication. Mutations can even be deliberately induced in order to adapt to a rapidly changing environment.

Most times, mutations are either harmful or neutral but in rare instances, a mutation might prove beneficial to the organism. If so, it will become more prevalent in the next generation and spread throughout the population.

In this way, natural selection guides the evolutionary process, preserving and adding up the beneficial mutations and rejecting the bad ones.

How whales took to water

Using evolution as their guide and knowing how natural selection works, biologists knew that the transition of early whales from land to water occurred in a series of predictable steps. The evolution of the blowhole, for example, might have happened in the following way:

Random mutations resulted in at least one whale having its nostrils placed farther back on its head. Those animals with this adaptation would have been better suited to a marine lifestyle, since they would not have had to completely surface to breathe. Such animals would have been more successful and had more offspring. In later generations, more mutations occurred, moving the nose farther back on the head.

Other body parts of early whales also changed. Front legs became flippers. Back legs disappeared. Their bodies became more streamlined and they developed tail flukes to better propel themselves through water.

Smoking gun

Even though scientists could predict what early whales should look like, they lacked the fossil evidence to back up their claim. Creationists took this absence as proof that evolution didn't occur. They mocked the idea that there could have ever been such a thing as a walking whale. But since the early 1990s, that's exactly what scientists have been finding.

The smoking gun came in 1994, when paleontologists found the fossilized remains of Ambulocetus natans, an animal whose name literally means "swimming-walking whale." Its forelimbs had fingers and small hooves but its hind feet were enormous given its size. It was clearly adapted for swimming but it was also capable of moving clumsily on land, much like a seal.

When it swam, the ancient creature moved like an otter, pushing back with its hind feet and undulating its spine and tail.

Modern whales propel themselves through the water with powerful beats of their horizontal tail flukes but Ambulocetus still had a whip-like tail and had to use its legs to provide most of the propulsive force needed to move through water.​