By Will Dunham

WASHINGTON, Oct 14 (Reuters) - Scurrying under the feet of dinosaurs in swampy terrain in Spain around 125 million years ago was a furry chipmunk-sized critter with tiny hedgehog-like spines, horny body armor and an unpleasant fungal hair infection.

This intrepid little guy now is providing the best look ever at the mammals that thrived during the Mesozoic Era, the age of dinosaurs.

Scientists on Wednesday announced the discovery near the Spanish town of Cuenca of the stunningly well-preserved fossil of a Cretaceous Period mammal named Spinolestes xenarthrosus.

It includes a complete skeleton, fur preserved at the cellular level, hedgehog-like spines, plate-like structures of keratin known as dermal scutes, a rounded external ear, skin pores and even soft tissues of the liver and lung.

"Yes, indeed, it is the best-preserved mammal fossil from the Mesozoic," University of Bonn paleontologist Thomas Martin said. "The discovery of Spinolestes is extremely exciting for me because it provides information on structures that we believed would never be accessible."

University of Chicago paleontologist Zhe-Xi Luo said this "cute furball" provides unprecedented insight into early mammals.

Spinolestes, about 9-1/2 inches (24 cm) long including its tail and weighing 1.8-2.5 ounces (50-70 grams), was a ground-dweller capable of occasional digging. It ate insects and worms and lived a lifestyle similar to a hedgehog in a lush wetland shared with dinosaurs, birds, the flying reptiles called pterosaurs and crocodilians.

"It would look like small rat, except it has a more pointy nose," Luo said.

Its hair, spines and the horny scutes, similar to those of armadillos, were preserved in exquisite detail down to the microscopic scales forming the hair shafts, hair bulbs in the skin and filaments making up the spines.

"This extinct mammal combines all types of hairs and hair-related structures of modern mammals: long guard hairs, velvet underfur, spines and scutes," Luo added.

The fossil is 65 million years older than the next-oldest record of microscopic structures of hair in mammal fossils.

Abnormally truncated hairs indicated Spinolestes had a fungal infection, dermatophytosis, common in mammals today.

Spinolestes, meaning "spiny robber," resembled an African rodent called a spiny mouse although it was not closely related to any living mammalian group.

It was a member of a primitive mammalian group called eutriconodonts that arose 170 million years ago and went extinct 66 million years ago along with the dinosaurs after an asteroid impact.

The research was published in the journal Nature. (Reporting by Will Dunham; Editing by Mohammad Zargham)