The final episode of Devs is now streaming on Hulu, and here's how Alex Garland's sci-fi series ends and what it really means. After a string of acclaimed high concept sci-fi movies in Ex Machina and Annihilation, Garland moved to TV to bring his latest story to life. Originally conceived as a show for FX, Hulu became the home for Devs after Disney's acquisition of Fox. Over the last several weeks, new episodes of the series have been released, with each revealing more details about the true plan Amaya CEO Forest (Nick Offerman) has for Devs and the importance of Lily Chan (Sonoya Mizuno).

Following the apparent suicide of her boyfriend Sergei (Karl Glusman), Lily spent most of Devs searching for answers surrounding his death and what Devs actually is. Devs is a computer program that is based on the principles of Determinism, using the absence of free will to accurately see the past and the future. Although it takes some tinkering to the code, Devs becomes fully functioning early on in the series. The Devs team sees Jesus dying on the cross, but they are not supposed to look at the future. However, that is exactly what Forest and Katie (Alison Pill) do, but they can only look up to a fixed point in time that sees Lily die in the Devs facility. This leads them to tell Lily of the importance she will play and that there is nothing she can do to change the outcome.

Related: The 25 Best Movies On Hulu Right Now

Multiple episodes of Devs were used to build to this climactic encounter between Lily and the Devs machine, with Lily arriving at the facility at the end of the penultimate episode. Forest and Katie are already at the facility and have watched what is about to happen several times, putting Lily in a position to see what she does. After seeing what Determinism says she will do, Devs' ending rests on whether or not Lily will do exactly what is predetermined. Here's what Lily does at the end of Devs.

What Devs Predicted Would Happen

The final episode of Devs begins with Lily entering Devs and being reunited with Forest. She meets up with him in the visualization room and they immediately begin discussing the events that will transpire over the next several minutes. Lily is still slightly confused about the lack of choice she has in the matter, while Forest shows his knowledge of the night by predicting when she will reveal the gun she is carrying. Lily wants a better understanding of what will transpire herself, so she asks Forest to show her the events, and he obliges knowing he won't be able to talk her out of it.

Lily is then able to witness what Devs has shown what will happen. The look to the future begins with Forest walking out of the room with Lily holding him at gunpoint from behind. She forces them onto the traveling capsule between the two areas of Devs, with Katie forced to open the doors. She says that she is scared despite seeing the events play out multiple times and gets angry with Forest when he says that everything will be alright. Once Lily and Forest make it inside the capsule, they begin talking again and Forest prods Lily to shoot him.

Devs' view of the future ends with Lily shooting Forest in the head, but the bullet also pierces the capsule's glass walls. This causes a breach and the capsule is no longer able to float within the electromagnetic field. The capsule plummets to the floor below and Lily slowly stumbles out of the ruins. But, she is only able to then pull herself along the floor a few more feet before she dies.

Related: Hulu's Devs: The Secret Projection Project Explained

How Devs Actually Ends

Sonoya Mizuno in Devs Season 1 FX:Hulu

After seeing the events of the night play out, Lily changes the outcome by making a different decision than the one shown by Devs. The sequence of events happens as predicted at first, but Lily makes a new choice when she and Forest step inside the capsule. As the doors are closing, she tosses her gun out of it, ensuring that she will not kill Forest, which will in turn not result in the capsule to fall and kill her as well. However, this is then followed by other unforeseen decisions. Stewart, having also used Devs to see the future, is standing on the other side of the facility and does what he can to keep reality on track. He shuts off the electromagnetic field keeping the capsule afloat, causing it to crash and lead to the deaths of Forest and Lily. When Katie asks why he did that, Stewart explains that it was predetermined.

With Forest and Lily still dead, Devs dives into unseen territory for the characters and viewers. Katie is shown interacting with Forest in the visualization chamber, where it is revealed that he has become part of the Devs system. Forest remembers everything that happened and Katie explains that Lily's disobedience to the system is why they were never able to see beyond that point. Katie says that Devs is now all-knowing and all-powerful based on Lyndon's principle of applying Hugh Everett's many-worlds theory, which states that all possible outcomes of quantum measurements are physically realized in some world. Once Forest accepts this to be true (since he was against this theory in the past), Katie initiates a new simulation that could result in Forest being reunited with his deceased wife and daughter. Katie then looks into the simulation to see the new life Forest is living and wants to make sure that the system will be able to keep running.

Lily & Forest's Rebirths Explained

Nick Offerman and Sonoya Mizuno in Devs Season 1 on Hulu

Thanks to the application of the many-worlds theory, Forest and Lily are shown to have been reborn inside the Devs system. This new simulation begins where Devs began, on the day that Sergei would be accepted into the Devs program. However, only Lily and Forest remember the lives they lived before. This is the result of Katie resurecting them using data from the moment of their death, so their memories were kept in tact. Forest explains to Lily that they are lucky to have ended up in a good version of this afterlife, as the many-worlds application means there are other versions that could be closer to hell than heaven.

Forest and Lily's new lives have some significant differences from what they experienced before, although most of the changes come with Forest's life. Lily finds Forest in the field behind Amaya's headquarters that usually hold the location for the Devs building, but no such structure is found here. The Devs project is not conceived in this world because Forest's wife and daughter are still alive. Since their deaths were a driving force behind Forest wanting to create a machine that could replicate the past, this world gives Forest no such motive.

Related: Devs: What Stewart's Poem Is & Why Forest Gets It Wrong

As for Lily, she is with Sergei when she "wakes up" but this could be a very different version of him. Many aspects of him appear to be the same, such as the covert Russian spy protecting him is still posing as a homeless man outside his apartment, and the secret messaging app disguised as Sudoku installed on his phone. However, Sergei's entire mission was to infiltrate Devs and learn its secrets, but that can't be the same since Devs doesn't exist. Instead of potentially figuring out this new life with Sergei, Lily appears ready to pick up where she and Jamie left off. She tracks him down and ends the series reunited with her ex-boyfriend.

Devs True Title (& Meaning) Explained

Nick Offerman looks on in Devs

The finale of Devs did include one more surprise, though: Devs isn't the actual title of the program or the show. Forest reveals in the final episode that the "v" in Devs is actually a Roman V, making it a "u" instead. "Deus" is the Latin word for god or deity, with the common phrase "deus ex machina" translating to "god of the machine." Forest is nearly a self-proclaimed Deus because of his creation and application of the Devs machine, while Lily becomes a deity-like figure in the eyes of Forest and Katie after disobeying the simulation, gaining a sense of superiority over the machine. The phrase can also be applied specifically to storytelling as an event that saves an otherwise hopeless situation. In that case, Lily's decision to toss the gun would be the deus ex machina. And, with the series finale's title card changing to Deus as well, Garland hammers home that this is exactly what Devs has been about from the start.

MORE: Why Hulu's Devs Represents A New Era of Cyberpunk