Tiny, trim and vibrantly colored, mud wasps are far more concerned with snaring snacks of spiders than appreciating works of art. But the insects will still build their nests on artistic creations—and in doing so, they sometimes inadvertently lend a helping wing to modern research efforts.

Reporting this week in the journal Science Advances, a team of researchers has used this stingingly clever technique to date Aboriginal art adorning rock shelters in Australia’s Kimberley region. Cobbled together in layers that lie beneath or atop the paintings, the nests place the paintings’ approximate age at 12,000 years old—making them about 5,000 years younger than previously estimated.

The thousands of dancing human figures depicted on the Kimberley rock shelter walls, called Gwions by modern researchers, have been known to science for more than a century. Slender, exquisite, and often decked out with headdresses, tassels, boomerangs and spears, Gwions don’t resemble other types of Aboriginal art, and the circumstances surrounding their creation have remained mostly mysterious.

In the 1990s, scientists led by University of Wollongong geochronologist Richard “Bert” Roberts noticed a series of ancient wasp nests constructed atop several of the Gwion figures. Dating those nests, they reasoned, would put an effective floor on the artworks’ ages: Any paint beneath the wasps’ creations had to be older than the nests themselves.

The group’s findings, published in 1997, estimated that some of the paintings were more than 17,000 years old, reports Bruce Bower for Science News. But other researchers were skeptical of the scientists’ technique, which depended on the identification and isolation of quartz particles—a common component of the sand in mud wasp nests—that hadn’t had any recent exposure to the sun.

Some two decades passed before another research team, this time led by Melbourne University’s Damien Finch, took up the artwork dating mantle. While examining the Kimberley paintings, Finch and his colleagues realized that another ingredient in the wasps’ nests could be used to pinpoint their origins: tiny bits of charcoal, inadvertently deposited alongside the quartz-containing sand.

Unlike quartz, charcoal can be dated by radiocarbon, giving Finch’s team more precise estimates. After collecting samples from wasp nests intermeshed with 21 paintings at 14 different rock shelters, the team arrived at a “remarkably consistent suite of dates” clustered at roughly 12,000 years ago, according to a statement. At least one painting, however, actually does date to about 17,000 years ago.

In an interview with Science magazine’s Elizabeth Finkel, Roberts, who wasn’t involved in the new study, praises the findings as “fantastic.”

As Jonathan Amos reports for BBC News, the efforts of Damien’s team were all approved by representatives from the communities behind the artwork.

“We couldn’t have done what we did without their active support and encouragement,” Damien tells BBC News.

As more Aboriginal artworks are dated through these and other methods, researchers stand to gain more insights into ancient cultural practices, June Ross, an archaeologist at the University of New England in Australia who was not involved in the study, tells Science News.

Already, the current crop of paintings may be providing a handful of insights. Around 12,000 years ago, an ice age was rapidly coming to a close, bringing a spate of climatic changes and natural disasters to the region, Finch tells Science. He adds that the richness of the paintings, which showcase clan dynamics and ceremonies, may reflect the social intricacies of this chaotic time.