In the oceans' inky depths lurk some of the largest animals on Earth. More than 40 species of whale spend their lives beneath the waves, surfacing only to breathe.

These marine behemoths are famous for epic migrations between warm waters (for breeding) and colder, nutrient-rich waters (for feeding).

The gray whale, for instance, swims more than 10,000 miles each year between Mexico’s Baja peninsula and Alaska's Aleutian Islands—one of the longest known migratory routes of any mammal. (Related: "The Rare Beauty of Dozens of Migrating Humpback Whales.")

Yet centuries of intensive hunting have driven some whale species close to extinction, including the North Atlantic right whale. Once abundant in the waters between North America and Europe, fewer than 500 of this endangered species remain.

Here are 14 stunning photographs of whales trying to survive in an often inhospitable world.