Since ancient times, people have marveled at the moon, worshipped the moon, written songs about the moon — and wondered how it came to be.

In recent decades the scientific consensus has been that the moon formed billions of years ago from debris cast off when a Mars-sized object dealt Earth a glancing blow. But a radical new theory holds that some long-ago giant collision actually disintegrated Earth, causing it to balloon out into a vast doughnut-shaped cloud of vaporized rock, which the scientists who developed the theory dubbed a “synestia." They say the moon subsequently formed within this cosmic maelstrom.

The new theory could reshape ideas about how Earth and other planetary systems came to be, according to the team of astronomers behind it.

“It was sort of serendipity, combined with a number of eureka moments,” Simon Lock, a graduate student in the department of Earth and Planetary Sciences at Harvard University and one of the astronomers, said about the process that led to the development of the new theory.

Get the mach newsletter. This site is protected by recaptcha

In the long-accepted explanation of lunar formation, the collision between Earth and the Mars-sized object, known as Theia, ejected part of Earth's mantle — essentially molten rock and metal — and left debris orbiting our planet. Over time, the bits of debris collided and clumped together to form the moon.

But when the researchers used powerful computers to simulate this process, they ran into the same problem that has long vexed scientists examining the Theia theory: It was hard to see how the collision and the ensuing clumping of debris could explain the moon’s unique chemistry, said study co-author Dr. Sarah Stewart, a professor of Earth and Planetary Sciences at the University of California, Davis.

If the moon formed from debris created by the Theia impact, the chemical composition of the moon should differ from that of Earth. But that’s not the case. “The moon has a very distinctive composition,” Lock said. “If you look at major rock-forming elements, the moon looks exactly the same as the Earth.”

But if the moon formed within a vaporized Earth, that could could account for the similarities in the celestial bodies’ chemical compositions.

Stewart said the new theory comes after a decade of “intense rethinking” of the lunar formation process, adding that more work needs to be done. “We know of things that need further clarification,” she said. “We published this to say, here’s how we can do this a new way, and here’s why we think it could be pointing us in a new direction, but we haven’t tied off all the loose ends yet.”

This hasn’t stopped the theory from raising a few eyebrows.

Dr. Paul Warren, a University of California, Los Angeles geophysicist who has done extensive work on lunar formation but was not involved with the new study, called the new theory innovative but said it had limitations. Chief among them, he said, is that it relies on an impact of almost unimaginable scale.

“That requires either one stupendously energetic impact, or multiple very closely sequenced giant impacts,” Warren told NBC News MACH in an email. “While that certainly appears plausible, at this early stage of our rapidly increasing knowledge of such things, I believe some other experts on planet accretion would not be quite so sanguine about it.”

But the new theory at least addresses the chemical composition problem — what scientists in the field call “the isotope crisis of moon formation.” So said Dr. Andreas Pack, an isotope geochemist at the University of Göttingen in Germany, who, like Warren, was not involved in the new research. “It’s a very complicated model, and the more complicated a model is, the easier it is to tune the model so that it explains everything,” Pack said.

The new study was published Feb. 28 in the Journal of Geophysical Research – Planets.

FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.