WARNING: The following contains spoilers for The Matrix Resurrections, now in theaters and streaming on HBO Max.

Just as The Matrix Resurrections revives Neo and Trinity despite their heroic sacrifices at the end of The Matrix Revolutions, the film also brings back the malevolent Smith. Once the most powerful Agent in the Matrix, enforcing the machines' will and hunting down any freedom fighters active in the digital world, Smith eventually went rogue before menacing both humanity and the machines alike. While Neo and the machines were seemingly able to destroy Smith, albeit, at the cost of Neo's life, the unhinged program returns in Resurrections and is quite close to Neo. Here's why the machines would risk bringing back such an uncontrollable program in the rebooted Matrix.

In Resurrections' rebooted Matrix, Neo is back to his civilian identity as Thomas Anderson, now a successful video game designer who created a trilogy of enormously successful games, unaware of the truth behind his inspiration and his past persona. Thomas works with Smith, a business partner who monitors his activities and tacitly forces him to create a new installment in the Matrix video game series. As the new freedom fighter Bugs and a digital projection of Morpheus help Thomas regain his memories, so too does Smith, recalling his past life as an exiled program and his longstanding feud against Neo, then going violently rogue once again. However, with the machines revealing they purged most of the exiles when they rebooted the Matrix, it calls into question why Smith was allowed to survive.

RELATED: The Matrix Resurrections Star Promises the Best Action Sequence in Film History

Agent Smith is now a game developer helping Neo in The Matrix Resurrections

The motivation to resurrect Smith is linked to Neo's own resurrection; the two men have been intrinsically connected since they first came to blows in the original Matrix film. In The Matrix Reloaded, Smith revealed to Neo that he was no longer working with the other Agents, as Neo's destruction of one of his forms in the previous film served as a self-aware awakening for him. Bound to Neo because of the shared experience, Smith has become a virus that can take over other programs and users within the Matrix and replicate himself. The Matrix Revolutions expands on this, with the Oracle revealing that Smith has effectively become Neo's negative inversion, a result of the Matrix's digital equation attempting to balance itself out in reaction to the immense power Neo now wields, exceeding their initial programming.

Just as the Analyst, the machines' program running the rebooted Matrix, surmises the resurrected Neo and Trinity need to be kept together to generate more power for the machines in the real world, Smith is similarly necessary for the Neo equation to be balanced and in working order. To that end, Smith is revived along with Neo, but reprogrammed with a new physical appearance and set of memories to avoid him or Neo remembering who they are while still monitoring Neo to ensure he stays on the tasks the Analyst has prepared for him.

RELATED: Matrix Resurrections' Keanu Reeves Doesn't Care if You Choose HBO Max or Theaters

The Matrix Resurrections — Smith

Ultimately, while reviving Smith may have been necessary on some level to properly resurrect Neo and Trinity, the Analyst's plan to reprogram and control Smith spectacularly backfires. Though Smith clearly has no love lost for Neo, he sees the Analyst as a common enemy, driving the controlling program away during The Matrix Resurrections' final battle before turning on Neo once again. And though Neo triumphs over Smith once again, the program is likely still active, ready to be the wild card he has always been and continue his vendetta against Neo in whatever twisted way possible.

The Matrix Resurrections is open in theaters and currently available to stream on HBO Max.

KEEP READING: Matrix Resurrections Not Expected to Topple Spider-Man: No Way Home at the Box Office