Having a dental procedure is painful enough with modern medicine—but it must've been even worse before the invention of high-speed drills and pain killers. Long before these inventions, however, it seems people have been fiddling with each other's teeth.

A new study, published in the journal Physical Anthropology, details the work of one Neolithic dentist in Italy between 13,000 and 12,740 years ago. Archeologists discovered teeth some 20 years ago from six Neolithic people in an area called Riparo Fredian in the mountains of northern Tuscany, Bruce Bower reports for ScienceNews. The new study focuses on two of the incisors, which contain marks that suggest a pointed instrument, likely a stone, was used to enlarge cavities in the teeth and scrape out decayed tissue.

The Neolithic dentist then seemed to stick dark bits of bitumen—a type of naturally occurring tar that Ice Age people used to waterproof baskets and pots—to the walls of the cavity. The researchers also found bits of hair and plant fibers stuck in the bitumen, though they are not sure what purpose they served. Overall the teeth appeared to have undergone a similar process as seen in modern dentistry: the cavities were drilled out and filled.

While this is the only example of the technique discovered, team leader Stefano Benazzi, of the University of Bologna says it might not be an isolated case and that the technology could have spread. “[T]hey may be part of a broader trend, or tradition, of dental interventions among late [Stone Age] foragers in Italy,” he tells Bower.

And while the use of bitumen as a filling seems to be a new find, Brian Owens at New Scientist reports that in 2015 Benazzi and his colleagues described a slightly older tooth from a different site that showed signs of having a cavity drilled out. Prior to this discovery the oldest-known use of a filling came from Pakistan, where researchers found a 6,500-year-old tooth that was filled with a wax cap.

The find is helping researchers rework the history of dentistry. Claudio Tuniz, an archaeologist at the University of Wollongong in Australia, tells Owen that researchers thought that humans began developing dentistry techniques after the advent of agriculture, when an increase in the consumption of high-carbohydrate grains and other sweet foods like honey led to a dramatic rise in cavities. But this latest find upends that timeline.

Tuniz points out that these teeth come from a period in European history when many peoples from the near East were migrating to the area and could have brought different foods with them. “This change in diet and cavities could have led to dentistry,” he tells Owen.

According to a press release, there is a chance this was not a dental procedure, however, and that the Stone Age people drilled the holes to insert pieces of jewelry. But the presence of bitumen is unusual and the most likely reason is to slow the decay of the teeth.