In the middle of the 19th century, thousands of gold-crazy prospectors were flocking west across North America hoping to strike it rich. There was gold in them hills, but not enough to go around, so most struck out. But an elite few found unexpected success by pivoting their digging, dredging, and sifting startups to search for the bones of giant reptiles. Because the Rocky Mountain region contained many fossil-rich quarries, the gold boom became the Apatosaurus boom and the Allosaurus boom and the Diplodocus boom. The dinosaur rush was on.

The discoverers of these fossil-rich quarries may have been awestruck, but they were always more motivated by the bottom line than by scientific progress. They came looking for things to dig out of the ground to sell for money and that’s pretty much what they found. Lukas Rieppel, a science historian with Brown University, studies the early history of American paleontology, and has traced the many similarities between the gold diggers and the fossil hunters of the Wild West.

“A lot of the early history of paleontology is very, very closely bound up with the history of mining, because it’s through mining that fossils are often uncovered,” Rieppel tells Inverse. What’s a prospector to do if he comes across a pile of old bones instead of gold? Sell to the highest bidder, of course.

Gold prospectors in 1877, Wyoming. Wikimedia

But the problem with both gold mines and dinosaur quarries is that it’s hard to say what’s in the ground until it has been dug out. That means the finder, who usually can’t finance the excavation himself, needs someone to bankroll them. Those financial relationships can get contentious when what’s under the dirt is more dirt. Remember that scene in the pilot episode of Deadwood in which Al Swearengen conspires to trick rich city boy Brom Garrett into buying a gold claim, believed to be worthless? That’s this process, in action. At best, the exchange is characterized by mistrust and manipulation. At worst, cheating and trickery. And those were pretty much the twin pillars of the dinosaur boom.

Rieppel has written about some of the earliest American fossil finds, and the long, protracted negotiations that followed. “In the U.S., when people start finding dinosaurs in the 1870s and ‘80s, almost immediately they become a public sensation,” he says. “And the ones that really caused a big stir are the ones that are found in the American West.”

American paleontology really took off in 1877, when three major deposits of vertebrate fossils were discovered in different regions. Fossils suddenly became a commodity.

The finders of the fossils, though, were at a bit of a disadvantage, since there were really only two people with the means and interest to buy the bones, bitter paleontological rivals Othniel Charles Marsh and Edward Drinker Cope. Rieppel describes a long correspondence between Marsh and William Harlow Reed, who discovered the amazing reservoir of fossils at Como Bluff, Wyoming. Reed made a few errors in the negotiations, which lasted more than a year, including sending key samples to Marsh before a contract was signed. (Unlike gold, the first bones you pull from a quarry are significantly more valuable than subsequent bones of the same type.) Reed eventually settled, agreeing to give Marsh rights to the contents of the quarry in exchange for a monthly wage to continue digging up the bones and sending them along.

Dinosaur fossils regularly go up for auction, to the chagrin of many paleontologists. Mario Tama/Getty Images

Just as there have been multiple gold rushes prompted by new, exciting finds, so too have there been waves of interest in hunting for dinosaurs. After that first rush, a new wave of interest began in the early 20th century, as philanthropists began funding large natural history museums that competed for the best fossil collections. Even more recently, the sale of a Tyrannosaurus rex named Sue for $8.4 million in 1997 reinvigorated interest in commercial fossil hunting, especially in areas of China and Mongolia where a wealth of extraordinarily well-preserved fossils continue to be found.

While fossils have long been treated much like any other commodity dug up out of the ground, not everyone is happy about it. “It’s a very controversial issue — the idea that you can buy and sell not just fossils but any kind of scientific specimen,” says Rieppel. “Something about science and money, or science and commerce, or science and capitalism — there seems to be some kind of tension there.”

Commercial fossil exports are actually banned completely in many countries, including China and Mongolia, which is ironic given that so much of the trade originates from those countries. “It’s clear that it’s illegal for them to be there, but those laws don’t seem to have had too much of an effect in dampening the international fossil trade,” says Rieppel.

You can, as it turns out, put a price on a dinosaur. Mario Tama/Getty Images

The problem with allowing a commercial fossil trade is that the most spectacular fossils will fetch enormous prices — and research institutions just can’t compete with the world’s billionaire collectors. Once a dinosaur belongs to someone, it’s essentially out of scientific reach — many paleontology journals will not accept articles about specimens that are in private control, since the ability for other researchers to go back and verify results, or build on previous work, is a fundamental tenet of the scientific process.

But commercial fossil hunters will argue that their work is good for science — putting a price on fossils means there are more people out there looking for fossils. And the faster fossils get found, the fewer are lost to erosion.

“What the debate comes down to is really about values,” says Rieppel. “It’s really a debate about whether capitalism and science are incompatible with one another, or whether they can actually work together.”

Maybe there’s a happy medium, where fossil hunters are permitted to make a living from the majority of their finds, but are compelled to give up specimens that are of particular scientific interest into a public trust. But for now, the scientific community has largely come down on the side of banning commercial fossil trades, and that’s unlikely to change dramatically any time soon.

Although, prohibition and the War on Drugs have shown good evidence that making something that people value illegal won’t make it go away. And a quick eBay search will show that to be true for Chinese and Mongolian fossils, too. If you’re looking to get your hands on your own piece of dinosaur history, beware the snake oil salesmen — just as in the old days of the Wild West, there will always be Swearengens of the world looking to make a quick buck off some unsuspecting dupe.