WARNING: The following contains major spoilers for Tenet, now in theaters.

The plot of Tenet takes a while to piece together, and even the end is chaotic. For the world to be saved, everyone has to be in the right place at the right time, but Tenet's who, what, why, when and whereabouts can get lost in the stunning visuals effects and muffled dialogue, even for those paying close attention.

The first act involves John David Washington as "the Protagonist" trying to orient himself in his changed reality. The Protagonist discovers there's a secret organization called Tenet operating inside (or maybe outside of) the CIA. He's charged with trying to prevent a cataclysm worse than a hypothetical World War III, and it involves technology that "inverts" objects by sending them backwards through time via reverse entropy.

RELATED: Warner Bros. Will Only Screen Tenet In Theaters That Require Masks

With the help of his newfound partner, Neil (Robert Pattinson), the Protagonist traces some inverted bullets to a Mumbai arms dealer named Priya (Dimple Kapadia). She suggests they secure an audience with crooked Anglo-Russian business magnate, Andrei Sator (Kenneth Branagh), through his semi-estranged wife, Kat (Elizabeth Debicki). Eventually, Sator lets the Protagonist and Neil into his inner circle, and they participate in what is supposed to be a plutonium deal. It turns out to be something much more menacing.

Sator has been receiving pieces of "the Algorithm," an entropy bomb sent from the future that will, theoretically, reverse and/or explode time. Kat and Priya each provide necessary explanations for why Sator, and future civilizations, would want to do such a thing.

The implication is that humanity's poor stewardship of the planet has created a climate where future generations want to punish their ancestors. Sator is happy to help because he's dying of terminal cancer, so if he can't live, nobody can. He longs to go out like a god, ending the world literally on his watch.

RELATED: Tenet's Early Rotten Tomatoes Score Is Solid, But Not Spectacular

The Protagonist has, seemingly unwittingly, delivered the final piece of the Algorithm straight into Sator's hands, at which point the character attempts to invert himself for what seems like the first time, in hopes he can affect a different outcome. The team deduces that Sator plans to kill himself in order to detonate the time bomb, and that he'll choose to do so on one of his last happy days, aboard his yacht.

This sets up what is the most confusing part of Tenet. Sator ends up in the employ of these future terrorists because he lives in a Soviet "closed city" and receives their directions. The Algorithm is there, and Tenet must deactivate it. Kat returns to the yacht to delay Sator's suicide, but her anger gets the better of her, and she goes off-plan and shoots him.

Meanwhile, two teams of operatives, color coded red and blue, deploy to confiscate the Algorithm. They synchronize their clocks, having only ten minutes to complete their mission, while under assault from Sator's forces. The red team moves forward in time while the blue team has been inverted. They're both working toward the chamber that contains the nine components, at a moment in the middle.

RELATED: Tenet's John David Washington Gets Nolan's Vote to Play Green Lantern - But He Won't Direct 

At the climax, in forward-facing linear time, the Protagonist and his team leader, Ives (Aaron Taylor-Johnson), are foiled by a locked gate. An injured soldier with a red string on his backpack leaps into action, preventing the Protagonist from being shot and helpfully unlocking the final door.

With the apocalypse having been thwarted, the three men split up the pieces and promise to hide them from each other and the world. It's at that point the Protagonist notices Neil's backpack, which has a red string dangling from the clasp. He realizes that it's Neil, just moments in the past, who sacrifices himself for his friend and the mission.

Tenet is regularly in a debate with itself about whether time loops can be altered. Neil reminds the Protagonist that the desired outcome is achieved and assures him that what happens is always what had to happen. He's ressigns to his fate, but he also gives his partner one last bit of crucial information.

RELATED: Tenet Posts Surprisingly Strong Opening Weekend Overseas

While the end of the movie is the end for Neil, who's inverted and boarding a plane to his death, it's only the beginning for the Protagonist, who will go on to found the organization known as Tenet. He'll eventually recruit Neil, who will become a true friend, and Priya, who will not.

In the closing scene, Priya is in position to assassinate Kat as she picks up her son from school. The Protagonist gets to Priya first, confirms they've all been working for him the whole time and takes her out. The conclusion makes it seem as though the world was always going to be saved, but still, as the Protagonist says, nobody appreciates the bombs that don't go off.

Written and directed by Christopher Nolan, Tenet stars John David Washington, Robert Pattinson, Elizabeth Debicki, Kenneth Branagh, Dimple Kapadia, Martin Donovan, Aaron Taylor-Johnson, Himesh Patel, Clémence Poésy, Denzil Smith and Michael Caine. The film is in theaters now.

KEEP READING: Does Tenet Have A Post-Credits Scene?