BERLIN -- Scientists say the fossil of a small, furry creature found in a Spanish quarry indicates that mammals evolved hedgehog-like spines far earlier than previously thought, according to a paper published Wednesday in the journal Nature.

The fossil dates back some 125 million years to a time when dinosaurs were roaming the earth and mammals moved about mostly at night. Previous finds at the Las Hoyas Quarry in east-central Spain include birds, reptiles and frogs, but this is the first true mammal discovered there.

"There were very special conditions present at Las Hoyas that allowed it to be preserved so well," said Thomas Martin, a professor of paleontology at the University of Bonn, Germany.

Thanks to a phenomenon called phosphatic fossilization, which preserves even tiny details, the scientists were able to use electron microscopes to identify individual hair shafts including some that had fused together into spines, like those of modern hedgehogs and porcupines.

"This species was wiped out a long time ago, so it shows that spines evolved separately in mammals several times," said Martin, who co-authored the study together with scientists from the United States, Spain and France.

The rat-sized creature, named Spinolestes xenarthrosus, also had large external ears that suggest it relied more on hearing than on eyesight, he said.

The findings add to scientists' understanding of the diverse range of mammals that had evolved by that time, some 35 million years after the first true mammals emerged.