Pandas love bamboo, but they might not have acquired a taste for this bitter, nutty-flavored plant until recently. Paleontologists discovered the fact while studying a newly described relative to giant pandas, named Agriarctos nikolovi, which hung out in Europe a few million years ago and sported a smaller set of teeth than their modern family. The findings, published on July 31 in the Journal of Vertebrate Paleontology, suggest the panda species was likely the last to live in Europe.

The fossil teeth were first unearthed in the late 1970s in northwestern Bulgaria in coal deposits that blackened the chompers. Because the Bulgarian National Museum of National History did not clearly list the specimens in their catalog of fossilized treasures, they remained untouched in storage until an accidental discovery by staff 40 years later.

“They had only one label written vaguely by hand,” Nikolai Spassov, a paleontologist and museum professor at Sofia University in California, explained in a press release. “It took me many years to figure out what the locality was and what its age was. Then it also took me a long time to realize that this was an unknown fossil giant panda.”

The upper canine and upper molar of the dental sample trace back to a species closely related to today’s giant pandas, which only live in southwest China. The ursids roamed the forested and swampy areas of Europe nearly 6 million years ago in the Miocene epoch. A. nikolovi had smaller teeth than present-day pandas, but bigger ones than other panda species of that time period. The study authors hypothesize that through evolution, the mammals’ canines and molars likely grew to protect them from predators. Bigger teeth also require a bigger mouth, suggesting these pandas were similar in size or just slightly smaller to present-day pandas.

[Related: Pandas have cute markings because their food supply sucks]

While this isn’t the first prehistoric panda found in Europe, the majority of the other specimens date back to around 10 million years ago. Given that the fossilized teeth at the Bulgarian National Museum of National History are more recent, it’s probable they belonged to the last panda species on the European continent. Though they are closely related, A. nikolovi is more of a cousin than a direct descendent of giant pandas. Previous research suggests the oldest direct descendent of the giant panda is a species found in Spain called the Kretzoiarctos beatrix. It existed at least 11.6 million years ago. 

Of further note, A. nikolovi was vegetarian, though bamboo was probably not part of its diet. Today’s giant pandas have strong jaws and large, flat teeth to help grind up the leaves, stem, and stalks of the sturdy plant. Bamboo makes up 99 percent of a giant panda’s diet: Adults can eat 26 to 83 pounds of it every day. But A. nikolovi’s smaller teeth indicate it probably did not have the strength to chew and mash up the plant’s tough and inedible stalks, and opted for softer greens for nourishment instead. 

“The likely competition with other species, especially carnivores and presumably other bears, explains the closer food specialization of [modern] giant pandas to vegetable food in humid forest conditions,” Spassov said in the press release.

So how did A. nikolovi go extinct? Climate change, and specifically the drying up of the Mediterranean basin, might have affected the entire ecosystem of plants the mammals thrived on. While this idea is still under investigation, paleontologists speculate that similar environmental conditions could have propelled other closely related panda species like Kretzoiarctos beatrix to move out of Europe and into Asia 8 million years ago. From there, ancient pandas would evolve into the Ailuropoda, making up the playful bamboo lovers we know today.