Buuvei Mainbayar stands before a scene of devastation. It’s mid-September 2016, and in a remote corner of the southern Gobi, the reddish-brown dirt is littered with small plastic superglue bottles and pieces of broken bone.

Mainbayar crouches for a better look, turning over a sizeable chunk in his weather-beaten hands. His assessment is that these smashed remains are all that’s left of an ankylosaur, a kind of armoured dinosaur that roamed this part of the planet during the late Cretaceous.

Related: NEWLY-UNVEILED DINOSAUR FOSSIL IS BEST PRESERVED OF ITS KIND See the remains of an armored dinosaur called a nodosaur discovered in 2011 by miners in Alberta, Canada.

It’s a sadly familiar outcome for Mainbayar, a paleontologist at the Mongolian Academy of Sciences. Collecting fossils without a permit and exporting them are both illegal activities in Mongolia. But fossil poaching has reached epidemic proportions in the Gobi in recent decades, with dinosaur fossils selling overseas for huge sums. In 2015, for instance, actor Nicolas Cage had to surrender the illegally exported skull of a tyrannosaur called Tarbosaurus that he’d acquired for $276,000 from a Beverly Hills gallery.

In regions of the Gobi well-known for their fossil bounty, poachers come and take skulls, hands, feet, and other easily extracted parts. They use superglue to crudely set crumbling bones, and, in their haste, they often smash much of the rest of these highly valuable scientific specimens. (See a giant winged reptile that may have been one of the largest animals ever to fly.)

“It is truly heartbreaking to encounter full skeletons that have survived 70 million years of burial, only to be trashed by poachers searching for teeth and claws to feed into the black market,” says David Eberth of the Royal Tyrell Museum in Alberta, Canada.

The law is fighting back when it can. Several illegally trafficked dinosaur fossils were returned to Mongolia following a high-profile 2013 court case in the U.S. But that case highlighted a problem with convicting fossil thieves: How can experts prove beyond doubt that particular fossils originally came from the Gobi?

Now, scientists armed with advanced x-rays scanners think they can help stem the tide by creating a map of chemical “fingerprints” that can match a fossil’s signature to that of a particular geographic region. If they can perfect their technique, it should be useful far beyond Mongolia—places such as China, Morocco, and Argentina all have similarly thriving fossil markets.

Scanning the Scene

A week before Mainbayar discovered the smashed ankylosaur, Federico Fanti, a paleontologist at the University of Bologna and a National Geographic emerging explorer, stood in the Mongolian academy’s Institute of Paleontology and Geology in Ulaanbaatar, scanning fossils with a handheld device that would not appear out of place on a Star Trek set.

Known as a portable x-ray fluorescence scanner, the device allows the scientists to read the geochemical makeup of rocks and fossils. Last year, Fanti and his colleagues travelled to a series of frequently poached fossil sites in the Nemegt region of the western Gobi and used the scanner to record each site’s unique geochemical signature. They also used camera drones to create a much more detailed and accurate map of the geology of the region.

View Images The portable scanner provides nearly instant details on the elemental composition of a rock. Photograph by Phil Bell

Their hope is that they will be able to scan any Mongolian dinosaur fossil and instantly tell which locality it came from, using the precise chemical breakdown of the rocks, much as a barcode reveals the details of a product at a grocery store.

In the fossil collection in Ulaanbaatar, they scanned many legally acquired dinosaurs from each site to see if the signatures matched up. And so far, it seems to be working, as they report in the journal Palaeogeography, Palaeoclimatology, Palaeoecology. The team was able to match fossils housed at the Mongolian academy with their geographic origins based solely on their geochemical contents.

That’s especially exciting for scientists, because knowing precisely where a fossil came from, down to the exact rock layer, offers valuable clues to the life histories of these ancient animals.

In the wake of the 2013 court case, for instance, fossils of dinosaurs including Tarbosaurus and Saurolophus were eventually returned to Mongolia, where they went on display in Ulaanbaatar. These species are known only from the Gobi, so scientists were convinced they were Mongolian, but they didn’t know exactly which sites they came from.

This meant the fossils couldn’t be precisely aged, and important contextual information about the environmental conditions when they died was missing. The repatriated dinosaurs were great for display, but effectively useless for academic study.

View Images These fragments are all that remain of an "ostrich" dinosaur after poachers found the fossil. Photograph by Phil Bell

“Sometimes the Gobi is a depressing place to work,” says project co-leader Phil Bell of the University of New England in Australia. “It’s been famous for so long, and it’s yielded such enigmatic and charismatic dinosaurs, that paleontologists have become infatuated with it. But to see it now as this wasteland, plundered and vandalized by poachers, is really hard to stomach.”

By using the x-ray scanner to create a more precise match, the scientists added vital information about the date and paleoenvironment linked to the remains, making them once again valuable to science.

Digging Deeper

Early trials of the technique also helped match a fossilised group of beaked oviraptorosaur dinosaurs, poached from the Gobi in 2006, with the Bugiin Tsav location from where they’d been swiped. That revealed the age of these previously unknown animals, meaning they can soon be described as a new species. The remarkable fossil is the first known evidence of dinosaurs communally roosting, or sleeping in a group, as some birds do today, so the specimen has great significance.

While there needs to be additional testing of how changes in the rocks over time might affect the readings, the technique also holds great promise for investigating the origins of fossils collected and stored long ago, says Anthony Fiorillo a paleontologist at the Perot Museum of Nature and Science in Dallas, Texas.

“In addition to the potential law-enforcement aspects of this work, the application of geochemical techniques for determining provenance of fossil specimens has application across the field, as many times, we are searching for the exact location of fossil sites dating back to the 19th century,” he says.

Next, the team hopes to secure funding to continue collecting geochemical data at fossil sites across the Gobi, and to test their results using more powerful laboratory-based scanning facilities.

Bell envisions a day when auctioneers, dealers, or customs officials have a relatively cheap version of the scanner, which they can use to quickly determine the origin of a suspect fossil, hopefully catching poachers and making many more specimens available for science.

To help guard against any false positives, though, the method is best used as part of a suite of tools for combatting fossil poaching, Eberth adds. Education, collaboration between scientists and local and national governments, and better monitoring of remote fossil-bearing regions are all necessary parts of the effort.