A police raid in Brazil has saved our scientific knowledge of an incredibly well-preserved flying lizard that sported a ridiculously large head crest.

The police had been investigating illegal fossil trade, and in 2013 found the pterosaur Tupandactylus navigans fossil amongst 3,000 other specimens.

University of São Paulo paleontologist Victor Beccari and colleagues realized they had the most complete fossil of Tapejaridae (a group of crested pterosaurs) after piecing together the 2-meter limestone slab that had been sawed into six pieces to make it easier to hide.

CT scans helped reveal the amazing detail of the animal's unwieldy head ornament - almost half of the animal's total height - imprinted in the stone, which the researchers have just described in a new paper.

Pterosaurs are relatively rare in the fossil record because they have fragile, thinly walled hollow bones that allow them to remain light for flight - previously only fragments of tapejarid heads had been recovered.

The absence of lake-floor dwelling animals where the fossil was buried, in what's now the Crato Formation, suggests lack of oxygen contributed to the remarkable preservation of this fossil's soft crest and beak tissues.

T. navigans had a strange crest jangling down from its lower jaw too, as can be seen in the stunning paleoart the newly revealed fossil is inspiring on Twitter.

"This pterosaur was over 2.5 meters (8.2 feet) in wingspan and was 1 meter (3.3 feet) tall (40 percent of this is accounted for by the head crest)," Beccari told CNN. "With such a tall head crest and a relatively long neck, this animal may have been restricted to short-distance flights."

Around 115 million years ago, these ancient lizards may have used their ability to fly to flee predators via the skies over what's now northern Brazil, the team explains. Their flight was supported by a bone called the notarium.

This bone is a fusion of the first chest vertebrae that increases resistance to the bending and torsion stresses caused by flapping wings; the presence of the notarium confirms the pterosaur was indeed capable of powered flight.

Comparing the fossil to previous finds, the team suspects some differences might be due to sexual dimorphism (where members of the same species appear different depending on sex) rather than the existence of two distinct species as was thought until now.

This, however, needs further investigation to confirm.

"Pterosaurs were already mind-blowing before, but this new specimen, with its huge, awkward crest and long neck, is mind-boggling because – sort of like [flashy] peacock tails – they would have made him an attractive mate, but an easy target for predators and a poor flyer," Beccari told New Scientist.

"Like the peacock, it probably spent its time eating fruit off the ground or using its long neck to grab food from higher bushes."

The illegal export of insightful fossils like this one is a huge problem for Brazil.

Luckily, police found it before the fossil vanished into the world of private collectors, so that scientists could properly examine it and share this ancient marvel with us all.

The fossil was described in PLOS One.