Much has changed since the Paleolithic era — the invention of agriculture, the advent of organized religion, the rise and fall of civilizations — but one fact hasn’t: People got cavities then, as now. And before the advent of local anesthetic, the process of treating them sounds fairly miserable.

In a study published in the journal Scientific Reports last week, researchers examine the earliest known evidence that humans treated dental caries, better known (and deplored) as cavities.

Because this discovery predates the written word, we’ll never know for sure whether Paleolithic people dreaded seeing the dentist the way their modern descendants do. But based on the description of the treated tooth, the process had to be unpleasant.

A team of mostly Italian and German researchers examining a roughly 14,000-year-old molar found strange striations and chipping on the ancient enamel of a partially rotten tooth. When they tested the marks, they realized that they must have been made by pointed stone tools that were used to probe and scrape away at the decayed area. The fact that the chipped area is worn out confirmed that the scratches were made while the tooth’s owner was still alive — and, given the lack of local anesthetic, probably painfully aware of the procedure.

The molar’s owner, a 25-year-old male skeleton, was uncovered from a rock shelter in northern Italy back in 1988. Scientists have studied the ancient specimen for decades without realizing that the holes in the man’s lower right third molar might be more than just a bad cavity.

“The treatment went unnoticed for all these years,” lead author Stefano Benazzi, a paleoanthropologist at the University of Bologna, told Discovery News.

The finding predates the next-oldest evidence of dentistry by as much at least 5,000 years, according to Benazzi. But it doesn’t differ much from the cavity treatment used today. Just like their prehistoric predecessors, modern dentist’s drill away at the lesion to cut out the decayed part of the tooth — with the notable difference that they use sterile drills, rather than primitive pieces of rock.

Fillings weren’t used until about 6,500 years ago, when, according to a 2012 study, beeswax was used to fill a Neolithic tooth in Slovenia.

Benazzi and his colleagues believe that this oldest form of dental treatment evolved from toothpicking, apparently a popular activity among Paleolithic people. Archaeological digs have already uncovered plenty of ancient toothpicks made of bone and wood. It would not have been a huge leap for the molar’s ancient owner to progress from picking bits of food from his teeth to removing decay.

But this discovery is about more than just the ancient roots of dental work. It also speaks to the lifestyle of this 14,000-year-old man and his contemporaries. Benazzi’s study points out that cavities are associated with a high-carbohydrate diet (because the bacteria that cause tooth decay feed on sugar) and that the onset of cavities is typically pegged to the arrival of agriculture during the Neolithic period, several centuries after the tooth’s owner was dead and buried.

The presence of a cavity, and an attempt at cavity treatment, from the Paleolithic is a reminder that humans’ diets were changing to include more carbs even before we started farming. By the time we evolved to a grain-based diet (and, for some kids, a candy-based diet), cavities had become a fact of life. So too, apparently, were trips to the dentist.