Image copyright Silverback Films/BBC Image caption Being big means they can maximise the opportunities where they exist

Blue whales are the biggest animals that have ever existed on Earth but they only recently* got that way.

This is the extraordinary finding from a new study that examined the fossil record of baleens - the group of filter feeders to which the blues belong.

These animals were relatively small for most of their evolutionary existence and only became the behemoths we know today in the past three million years.

That is when the climate likely turned the oceans into a "food heaven".

Favoured prey - such as krill, small crustaceans - suddenly became super-concentrated in places, allowing the baleens with their specialised feeding mechanism to pig-out and evolve colossal forms.

"The blue whales, the fins and bowheads, and the right whales - they are among the most massive vertebrates to have ever lived," explained Nick Pyenson from the Smithsonian's National Museum of Natural History in Washington DC, US.

"Some of the dinosaurs were longer, but these big whales even outweighed the largest dinosaurs. And isn't that surprising? People kind of think of gigantism as being a fact of the geologic past. But here we are, living in the time of giants on Planet Earth," he told BBC News.

*Whales have been around for about 50 million years - a blink of the eye in the 4.6-billion-year history of the Earth.

Media playback is unsupported on your device Media caption New research sheds light on how whales communicate.

Dr Pyenson is publishing the new research - conducted with Graham Slater from the University of Chicago and Jeremy Goldbogen from Stanford's Hopkins Marine Station - in a journal of the Royal Society called Proceedings B.

It is based on a deep analysis of the Smithsonian's extensive collection of cetacean bones, and in particular of whale skulls which are a good indicator of overall body size.

The team estimated the lengths of 63 extinct species, including some of the very earliest baleens that swam in the oceans more than 30 million years ago. And combined with data on modern whales, this investigation was then able to establish the evolutionary relationships between whales of different sizes.

What emerges from the research is a picture showing not only that gigantism is a recent phenomenon but that this bigness arises independently in the different baleen lineages.

The smaller whale species that had previously persisted start to go extinct within the last three million years, right at the same time as the giants begin to appear.

Image copyright Getty Images Image caption The baleen plates that hang from the upper-jaw filter prey from a gulp of seawater

It all points to a major shift in the environment and the team suggests the best explanation is the onset of ice ages at the end of the warm Pliocene Epoch, the beginning of the Pleistocene.

The existence of major ice sheets would have restructured the oceans, changing the way water and nutrients were distributed.

"This period sees some dramatic changes, including the closure of the Panamanian isthmus, shutting off connection between the Atlantic and Pacific," explained Dr Slater.

“Ice sheets in the north develop a lot of cold water that sinks and is then transported around the globe. And what you get are intense upwellings that bring that nutrient-rich cold water back to the surface. That allows algae to go crazy and that allows krill to feed and to form really dense aggregations."

It is not the abundance of prey per se that favours large baleens, but rather the prey's patchy, concentrated nature. And with their filter-feeding system of eating, the big whales are able to take maximum advantage.

“They can travel from one feeding zone to the next very efficiently because their big size means their 'miles per gallon', their MPG, is very high. And they seem to know precisely the right time to turn up at these feeding grounds," Dr Slater added.

Image copyright Silverback Films/BBC Image caption Blue whales can reach over 30m in length, although this is rarely seen nowadays

Two points are worth noting. First, commercial whaling in the last century decimated baleen populations and very probably removed most, if not all, of the ultra-giants out there. Few blues now exceed the 30m lengths that were often recorded at processing factories.

Thanks to the international moratorium on whaling, the true giants could yet return. But this raises the second issue: the changing climate.

If the experts are right, we are heading back towards the Pliocene. Increased carbon dioxide levels in the atmosphere could well see global temperatures in the next century that are three or four degrees warmer than they are today. This would almost certainly trigger further ocean changes.

"We’re playing with the dials on 'Spaceship Earth'," commented Dr Pyenson.

"We don’t know how things are going turn out, especially for these food resources which may or may not be persistent in space and time. There are some baleens that we think might be more flexible. Gray whales, for example, appear to have a very broad feeding range; blue whales not so much - they really need their krill."

Image copyright Maria Teresa Lara Image caption What will happen to the oceans if the global climate returns to the Pliocene?

Richard Sabin is the curator of marine mammals at London’s Natural History Museum.

He called the research "compelling and important" and also highlighted the ecological knife-edge on which some of these animals must live: "There are 90 or so cetacean species. They’re a very diverse group and some of them are very specialised.

"So, you have creatures like the river dolphins that use echo-location to find their prey and the blue whales that are very specialised feeders with their krill. These animals have evolved within systems that they now depend on remaining stable."

London's NHM is about to make its blue whale skeleton the star attraction of a remodelled entrance hall.

The near-4.5-tonne specimen has been hung from the ceiling in a lunge-feeding pose, mouth open.

The display is under wraps for the moment, but a big unveiling is promised in the next few weeks.

"The visualisations that we released give you an idea, but they don't really do it justice. She looks spectacular. You get so many different perspectives from the different angles, and you get a real sense not just of her size but of her dynamism as well."

London’s Natural History Museum will also stage a new exhibition on whales to coincide with the unveiling.

Image copyright Casson Mann Image caption London's blue whale skeleton will shortly be unveiled in a new diving pose

Jonathan.Amos-INTERNET@bbc.co.uk and follow me on Twitter: @BBCAmos