SPOILER WARNING: The following article contains spoilers for Michael Bay's Transformers: The Last Knight, in theaters now.

RELATED: Transformers: The Last Knight Explains Shia LaBeouf’s Absence

As teased in a ton of the promotional material for Transformers: The Last Knight, franchise hero Optimus Prime has a mean streak in the fifth series outing. This new version of the character, referred to as Nemesis Prime -- a name familiar to longtime Transformers fans -- the new iteration of the fan-favorite Autobot aims to restore Cybertron by destroying our Earth. Let's explain why that happens...

First, let's go over where we last left Optimus in Transformers: Age of Extinction. The film revealed that Transformers have been meddling in Earth's events for centuries. The flick delved into the Creators of the Transformers, and their influence on Earth's history (which involved wiping out the dinosaurs). Concerned, Optimus departed Earth to find the Creators and get some answers surrounding the Transformers' history and their relation to humans.

RELATED: Bumblebee to Return to Classic VW Beetle Form in Transformers Spinoff

Well, in Transformers: The Last Knight, Optimus comes face-to-face with one of the Creators who goes by the name Quinessa. Hailing from a race known as Quintessons, the advanced aliens mastered the living metal, eventually learning to develop their own Transformers. The Quintessons created the Transformers to serve them, until eventually gaining sentience, their creations revolted against them, driving the Quintessons off Cybertron.

That is, until Quintessa herself returns to Cybertron -- just when Optimus arrives on his home planet -- she manipulates Optimus into destroying Earth for the sake of saving Cybertron. If Earth dies, Cybertron lives, she convinces him. Quintessa then, somehow, wields control over Optimus, turning him into the villainous Nemesis Prime.

RELATED: Transformers: The Last Knight: What the Critics Are Saying

Of course, by the midpoint of the third act, Optimus regains control over himself, thanks to the plea of his Autobot comrade Bumblebee who triggers Prime's transformation back into good old Optimus by speaking in his original voice (which we hadn't heard so far in the franchise).

In theaters now, Transformers: The Last Knight stars franchise veterans Mark Wahlberg, Stanley Tucci, Josh Duhamel, Tyrese Gibson and John Turturro, joined by newcomers Isabela Moner, Liam Garrigan, Jerrod Carmichael, Mitch Pileggi, Laura Haddock, Santago Cabrera and Anthony Hopkins.

RELATED: Michael Bay Explains Why Last Knight Is His Final Transformers Film