Climate scientists consult ancient tree rings all the time. These year-by-year growth bands, preserved in long-lived timber, can reveal how warm and how wet the planet was many centuries before thermometers or rain gauges were invented. For astronomers, by contrast, the idea of studying the stars by drilling into tree trunks would seem absurd.

Or maybe not. Sometime between the spring of 774 A.D and the summer of 775, a cataclysmic event happened somewhere out in the cosmos — and we felt it here, as a spike of radioactive carbon-14 and beryllium-10. The isotopes were taken up by growing Japanese cedar trees and there they remained.

The tree rings were flagged last summer in a paper written by Japanese physicist Fusa Miyake, of Nagoya University. Ordinary cosmic rays — atomic nuclei and subatomic particles that speed through the Milky Way — create carbon-14 in the upper atmosphere all the time, but at a more or less steady rate. What caught Miyake’s eye was that in this one window in history, during the late eighth century, the level was roughly 20 times higher.

When Ralph Neuhauser, of the University of Jena, in Germany, and his collaborator read the report, they immediately began speculating about the cause and in a paper just published in Monthly Notices of the Royal Astronomical Society, they have come up with an answer: a violent collision between the dense, compact remains of two dead stars — two black holes, perhaps, or a pair of neutron stars. That conclusion, however, required them to consider a number of other possibilities first, including one of the most obvious: a supernova — an idea they quickly rejected.

“If it were a supernova,” says Neuhauser, “you can calculate from the amount of carbon-14 how far away it would have been.” The answer: between 400 and 1,000 light-years. But a star exploding that close by would undoubtedly have been seen and noted at the time, he says, and even if it weren’t, the nebula of glowing gas left behind would long since have been spotted by modern telescopes. Or it could have been an unusually powerful solar flare or coronal mass ejection — but that, too, would probably have been noticed thanks to the overwhelmingly bright auroras it would have triggered in Medieval night skies.

So Neuhauser and University of Jena co-author Valeri Hambaryan turned to another possibility: the very short gamma-ray blasts triggered when two super-dense objects collide. Such collisions don’t produce a flash of visible light, so you wouldn’t expect to find any records even if someone had been looking in the right direction during that fateful two seconds.

What such collisions do produce, however, is an enormous burst of gamma rays in less than two seconds. And when those speeding waves of electromagnetic energy reached Earth, they would have zapped nitrogen atoms in the upper atmosphere, transforming them into just the storm of radioactive carbon and beryllium that was captured by the trees.

If such a collision had happened within 3,000 light-years of Earth, the blast of gamma rays would have been powerful enough to reach right down to the planet’s surface, and it would have been lethal enough to wipe out many species. Since no such mass extinction happened, reason Neuhauser and Hambarayan, the gamma bath must have come from farther away, but still less than 12,000 light years, judging by how much carbon-14 did get preserved.

And exactly where in the sky did the collision occur? That’s much tougher to figure out. Winds spread carbon-14 through Earth’s atmosphere within a few months, so the effect would have been world-wide — meaning that it’s not so easy as looking just in the northern sky that would have been visible from Japan. Nevertheless, says Neuhauser, it’s possible that trees would have slightly more of the element in the hemisphere where the blast first struck. If by chance the triggering event had been a solar flare after all, you’d expect to find more carbon-14 near the poles, where Earth’s magnetic field would have channeled particles from the Sun.

The good news, says Neuhauser, is that this single event is the only one of its kind in the past 3,000 years, which is as far back in time as tree rings reliably go. Black holes and neutron stars can be tough to spot, and if our corner of the Milky Way were packed with either kind of cosmic oddball,we might have to worry about gamma-ray showers as a significant threat. The trees tell us a dramatic — but also reassuring — tale.