More than six million years have passed since early humans first walked upright, and it’s still unclear exactly why we made the switch from four legs to two. One popular theory holds that the change was the natural result of an evolving landscape that made it more efficient to walk upright.

Now a pair of physicists have come up with an underlying cause for that shift — and it’s a wild one: Millions of years ago, a series of exploding stars not far away from Earth bombarded our planet with radiation, igniting wildfires that destroyed lush arboreal habitats and forced our ancestors out onto grasslands — where two-legged living made more sense.

“If you’re still using trees a lot, you now have to walk from one to the other — you can’t swing around up there like an orangutan,” said Adrian Melott, a physicist at the University of Kansas in Lawrence and lead author of a paper about the research published May 28 in the Journal of Geology. “If you’re going across the grassland, going on two legs is more efficient than four.”

To learn how stellar explosions, also called supernovas, could have affected the early Earth, the scientists turned to clues on the planet’s surface. They used previous research on deposits of iron-60, a radioactive form of the metal left behind by nearby stellar explosions, to identify a series of supernovas that began about 7 million years ago and peaked about 2.6 million years ago. Then they calculated how radiation from those explosions, called cosmic rays, might have affected life on Earth.

Most cosmic rays penetrate only the upper reaches of our atmosphere. But since the supernovas that researchers focused on were relatively nearby, their cosmic rays would have been powerful enough to reach the ground, knocking charged particles called electrons off air molecules. The scientists believe this change, called ionization, created a cozy environment for lightning strikes, a major trigger of forest-leveling wildfires.

Based on the iron-60 deposits, the scientists calculated a 50-fold increase in atmospheric ionization in the aftermath of one supernova, believed to have occurred about 2.6 million years ago at a distance of 163 light-years from Earth. If their theory is correct, cosmic rays unleashed by the supernova could have driven a massive wave of lightning strikes, igniting wildfires that changed the landscape from verdant forest to grassy savanna.

That’s where bipedalism comes in, the scientists say. Biological anthropologists have long theorized that a change from forest to savanna may have helped prompt proto-humans walk upright. As trees became few and far between, the theory goes, it was more energy-efficient to travel on two legs, giving bipedal hominids a reproductive edge.

The researchers say their theory is corroborated by the geological record, which shows a spike in wildfire byproducts like soot and charcoal in soil beginning 7 million years ago.

But the scientists acknowledge that their theory isn’t airtight. The weakest link, Melott said, is the connection between cosmic rays and lightning, which is difficult to investigate when the events leading up to a lightning strike are so poorly understood. “You can’t have instruments measure lightning because you don’t know where it’s going to happen,” he said. “It’s very difficult.”

Even if supernovas did play a role in bringing bipedalism to our ancestors, experts say it’s unlikely to have been the only factor. By the time the supernova activity peaked, about 2.6 million years ago, “you have some things walking around that are quite bipedal already,” said Isabelle Winder, an evolutionary anthropologist at Bangor University in Wales who was not involved in the research. She cautioned that the so-called “savanna hypothesis” for bipedalism, which dates back to the 1920s, is considered by some scientists to be an oversimplification.

“Increasingly, we look at the environmental evidence and we go, ‘No,’” she said. “We might be seeing one fraction of the complex whole.”

Melott and his coauthor agree — to an extent. “Bipedalism had already gotten started,” he told the Guardian. “But we think this may have given it a strong shot in the arm.”

Want more stories about space?

SIGN UP FOR THE MACH NEWSLETTER AND FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.