'Avengers: Endgame' writers admit time-travel plot was so confusing they had to shoot new scenes to explain it

Warning: Major Avengers: Endgame spoilers below.

Christopher Markus and Stephen McFeely learned about the power of Back to the Future firsthand.

After early test screenings for Avengers: Endgame, the sixth Marvel Cinematic Universe entry the power duo wrote, they found audiences were severely confused by their rules of time travel.

McFeely pointed to the scene in the film's climactic showdown when present-day Nebula (Karen Gillan) shoots the still-villainous, time-traveling version of herself who has arrived with Thanos (Josh Brolin) to wreak havoc. "Much of the audience was expecting that Nebula to disappear. And we're going, 'No, we told you, it doesn't work that way!' So we really needed to underline it," he explained.

"It's a testament to Back to the Future, that everyone who walks into a time-travel movie goes, 'Well, I know how this works.'"

Said Markus: "We would try to imply our rules lightly and people would go, 'So it's Back to the Future.' And we very much needed to be not to be Back to the Future or our movie doesn't make sense, no offense to Back to the Future."

So the scene where Bruce Banner (Mark Ruffalo) explicitly counters the science of that 1985 classic — not to mention all those other movies mentioned — ("If you travel to the past, that past becomes your future. And your former present becomes the past. Which can’t now be changed by your new future.") was conceived and shot after test audiences failed to grasp Endgame’s time-hopping rules.

Our whiteboard depicting time travel trails in 'Avengers: Endgame'

Even with the filmmakers trying to explicitly spell out the mechanics of time travel, the Endgame end product still led to plenty of confusion and debate, including among the filmmakers themselves. Markus and McFeely admit they have some conflicting thoughts from directors Joe and Anthony Russo. (More on that later.) But the writers further explain their idea thusly:

"In general, it's a branch reality system versus a one-reality system," McFeely said. "Which is what scientists say, theoretically if time travel were possible — which it isn't, everyone — it would sort of look like this."

"It's a combination of what Hulk says and what the Ancient One [Tilda Swinton] says," Markus added. "One, that if you go to the past from the present, the present becomes your past, so it's not gonna change. And that the only thing that causes branched realities is the removal of one of those six Infinity Stones. So if I go back into time and grab a shoe, you're not going to have a shoeless universe. It's only if you move the stones."

Again, that's not a definitive answer, since opinions differ among the MCU brass. But Markus and McFeely did weigh in one of the biggest questions fans have been left with: whether or not Steve Rogers (Chris Evans) was always the husband of Peggy Carter (Hayley Atwell) in the MCU, given the revelation of his own solo time travel efforts in the film's closing minutes.

"That's our opinion, to be fair, I think Joe and Anthony might have a different opinion, and it kind of depends on what Marvel wants to do going forward," McFeely said. "But it was our thought that Steve lived in his own timeline and always married Peggy and those kids you see in Winter Soldier are his kids.

"We like that idea, but we'll certainly wait to see how Marvel wants to move going forward."

Avengers: Endgame is now playing. Watch our full interview here:

Read more on Yahoo Entertainment:

Want daily pop culture news delivered to your inbox? Sign up here for Yahoo Entertainment & Lifestyle's newsletter.