By Will Dunham

WASHINGTON, Dec 16 (Reuters) - Along a lush river delta in what is now northeastern Spain, a herd of dinosaurs munched on ferns and conifers similar to modern-day cypresses 125 million years ago.

These creatures stood out from the others in this Cretaceous Period landscape by virtue of the unusual sail-like structure on their backs, and experts today can only hypothesize about its function.

Scientists announced on Wednesday the discovery near the town of Morella in Spain's Castellón Province of the fossil remains of a medium-sized dinosaur they named Morelladon, a four-legged herbivore that measured 6 metres (20 feet) long.

Protruding from its back was a series of bony spines that formed the sail-like structure that stood about 2 feet (60 cm) tall.

"The sail could help in heat exchange - thermoregulation - focused on releasing excess body heat into the environment, like the ears of the modern-day elephants, or as a storage place for fat to be used during periods of low food supply," said paleontologist Fernando Escaso of the National University of Distance Education's Evolutionary Biology Group in Spain.

The structure also could have served a display role in attracting mates, Escaso added.

Escaso noted that sail-like structures appeared periodically in the evolutionary history of vertebrates, often in animal groups not closely related to one another.

Another plant-eating dinosaur called Ouranosaurus with similarities to Morelladon lived about the same time in Africa. The biggest sail-backed creature was Spinosaurus, which lived a semi-aquatic lifestyle 95 million years ago in Africa. At 50 feet long (15 metres) and 7 tons, it was the biggest dinosaur predator on record, larger even than Tyrannosaurus rex.

Millions of years before the rise of the dinosaurs, there were other sail-backed creatures including the carnivorous reptile Arizonasaurus, the amphibian Platyhystrix and the distant mammal relatives Dimetrodon and Edaphosaurus.

Morelladon is known from a partial skeleton including the spines, other vertebrae, pelvic bones, a thigh bone and teeth.

Northeastern Spain during Morelladon's time alternated between wet and dry periods, with strong temperature variations ranging from 40 degrees Fahrenheit (4 Celsius) to about 104 F (40 C).

Escaso said the main predator in the area was Baryonyx, a relative of Spinosaurus, and there were other plant-eating dinosaurs around as well as crocodilians and the flying reptiles called pterosaurs.

The research was published in the journal PLOS ONE.