NOTE: This spoiler was submitted by Jeremy

The film starts with ads on artificial intelligence being incorporated into American society to make things easier for mankind. In 2055, it is shown that a nuclear warhead detonates in Los Angeles due to the AI created by the U.S. government, incinerating over a million people. The military begins a mission to eradicate all AI across the country, but they find resistance from New Asia, who harbor the remaining AI as fellow citizens. The USS NOMAD (North American Orbital Mobile Aerospace Defense), a massive space station, is created and used to scan the grounds for signs of AI to wipe them out and find the so-called “Nirmata”, creator of the AI.

Ten years into the ordeal, Sergeant Joshua Taylor (John David Washington) is living in Ko Nang (New Asia) with his pregnant wife Maya (Gemma Chan). She has a closer connection to the AI than Joshua does, and he has a prosthetic arm and leg. At night, their home is visited by a team of droid officers led by Harun (Ken Watanabe), who bring a soldier (Sturgill Simpson) into the house. Joshua privately interrogates the man, who happens to be his friend and commanding officer Drew. Joshua is undercover in his marriage, as his officials believe Maya is Nirmata’s daughter. When the forces outside begin a raid, Maya learns the truth about Joshua and runs away from him. She escapes on a boat, but an explosive dropped by NOMAD lands among her group, apparently killing her while Joshua watches.

Five years later, Joshua works at ground zero in Los Angeles as part of a cleaning crew. During one of his patrols, he and his partner come across a droid that still has some sentience, and they shut it down, which the partner views almost like putting a human out of their misery. While alone, Joshua continues to reminisce about his time with Maya.

Joshua is approached by General Andrews (Ralph Ineson) and Colonel Howell (Allison Janney). They claim to have gathered intelligence that Nirmata is working in New Asia to develop a superweapon that can potentially destroy NOMAD, so they are recruiting Joshua to help stop them. He is ready to refuse until Howell shows him a holographic video indicating that Maya is still alive and working at the facility where the weapon is being developed. Joshua is then told he is the only one who remembers the layout of the lab and can not only help win the war, but also see his wife again.

Joshua joins a crew heading toward New Asia, led by Howell. She tells Joshua about her personal resentment for the AI due to losing her sons in the war. The soldiers antagonize the villagers before storming the lab, firing at the technicians before advancing. Joshua splits from the team and comes across a room where he finds the “weapon” – a little robot girl (Madeleine Yuna Voyles), watching cartoons. Before Joshua can apprehend her, a woman guarding the child shoots at Joshua and orders the girl to run. A gunfight occurs between New Asia’s forces and NOMAD’s mercenaries. Joshua manages to catch up to the girl and gets her into a boat to escape.

Joshua and the child end up in a deserted area by the lake, along with a wounded soldier named Shipley (Robbie Tann) who eventually dies. He finds the girl inside a house watching TV, where he witnesses her using her power to remotely control electronics. Noticing an Alpha-Omega symbol engraved in her head, Joshua names the child “Alphie”. Joshua gets in touch with Howell, who orders him to bring the child to her. They are found by an adult droid that is amazed at seeing Alphie. While the droid promises not to kill Joshua, he reaches for a gun on the floor, prompting Joshua to shoot him. This alerts nearby droid forces to that area. They fire upon the house until Joshua hops into a van with Alphie and drives away.

Howell and her subordinate McBride (Mark Menchaca) ride in a van, where they kill a droid officer and use his body when they find Shipley’s body after Joshua disposed of him and upload his consciousness to the droid with a limited amount of time to find out that Joshua has the child. Joshua and Alphie hitch a ride with a family after having to leave the van. At night, they pass through a checkpoint where Alphie uses her power to shut down the authorities’ electronics. Joshua has to take over the van when they start shooting at them, but they manage to escape, despite the accompanying family being mortified.

Joshua and Alphie then take a train going into the city after avoiding detection. On their way, Alphie asks Joshua about Heaven, to which he says he won’t go there because only good people go there. They arrive to meet Drew, who now lives with his own robot girlfriend Kami (Veronica Ngo). Drew has since changed his mindset on the AI community and works with Joshua and Kami to examine Alphie. It is determined that Alphie has not reached the full potential of her powers and can become the most powerful being alive with the ability to remotely control any piece of technology from anywhere on the planet.

Later, a knock is heard at the door after Kami orders ice cream for Alphie, but it turns out to be a bomb and it kills Kami. New Asian authorities begin to fire upon the group. Before they can try to kill Alphie, Joshua manages to disable the droid officers. More officers, now joined by Howell and McBride, arrive and continue to attack. Drew is gravely wounded, but before he dies, he helps Joshua find Maya’s beacon, as well as letting her know that Maya herself is Nirmata. Joshua and Alphie run but are captured by a team of soldiers led by Harun.

Joshua wakes up on a ship where he is locked in a cell. Harun speaks to him and tells him that the Los Angeles warhead was a manmade coding error that was blamed on the AI, as well as how Maya became Nirmata after her father, the original Nirmata, died. While he says that AI would never harm humanity, Harun says he will also not bring Joshua to Nirmata. Outside, the AI begin to panic as they realize they are being followed. Joshua escapes his cell and gets shot at, forcing him to jump into the water, but he holds on the ship’s hull.

After the ship arrives at a village, Joshua sneaks his way to find Alphie and recover her. Suddenly, Howell and her forces arrive to attack the village, utilizing gigantic machines along with a suicide-bomb robot that runs into the village to detonate. A second suicide robot runs across the bridge, but Alphie walks in front of it and uses her power to shut it down. McBride then shoots Alphie, breaking the connection as the robot blows up the bridge. McBride attempts one last shot to finish off Alphie, but Joshua kills him first.

Harun guides Joshua to bring Alphie to a temple where Maya is after Alphie is taken care of. Joshua discovers that Maya has been in a coma for the last five years, and since the robots cannot harm Nirmata, they are unable to take her off life support. Joshua also learns that Alphie is based off of his and Maya’s unborn child, who was scanned in the womb, essentially making Alphie their daughter. Joshua looks at his wife once more before pulling the plug himself.

Howell and her goons then arrive at the temple and try to bring Joshua and Alphie in. Harun throws a bomb at Howell, but Alphie manages to stop the detonation, to Howell’s surprise. Unfortunately for her, her two goons try to shoot at her, and before Howell can call them off, the bomb kills all three of them. As more forces arrive to attack, Harun tells Joshua that NOMAD must be destroyed in order for the war to end. On their way out, Joshua and Alphie are taken by droid officers.

Joshua and Alphie are brought back to Los Angeles, where Andrews orders Joshua to kill Alphie. They appear to share a brief, tearful final moment before Joshua pulls the trigger. En route to the incinerator, news of anti-NOMAD protesters forming in the streets comes out. Then, the vans start to lose power and end up crashing in the street. Alphie is still alive and planned with Joshua to fake her death so they can escape.

The two make their way onto a lunar shuttle heading toward NOMAD. Andrews realizes the ruse too late and begins to make plans to use NOMAD to strike down on the remaining AI bases. Joshua and Alphie make their way through armed guards and eject them into space. Alphie uses her ability to completely shut down NOMAD’s power momentarily as Joshua tries to plant an explosive on one of their missiles. While they make their way to an escape pod, Alphie finds a room full of humanoid robot bodies and finds one of Maya, putting her consciousness inside in an attempt to wake her up and bring her with her and Joshua, but it looks like she is unsuccessful.

Andrews activates a giant tentacle robot as Joshua and Alphie try to escape. Joshua manages to disable the robot, but he is left trapped aboard NOMAD after getting Alphie to safety. They share a final moment together, stating their love for each other before Joshua ejects Alphie. He then walks out and finds the Maya robot, who recognizes him. They embrace and kiss one more time as the explosive begins to obliterate NOMAD (the rest of the staff evacuated), halting the rest of the strikes while Andrews and the rest of his goons look on defeated.

Alphie’s pod returns to Earth. She witnesses everyone celebrating NOMAD’s downfall, and she begins to smile.

Brought to you by

In the future, an artificial intelligence created by mankind is blamed for detonating a warhead in Los Angeles, igniting a war against man and machines. The space station NOMAD is established to combat AI forces, and American soldiers seek out "Nirmata", the alleged creator of the AI.

Sergeant Joshua Taylor loses his wife Maya after an undercover mission to find Nirmata. Years later, he is tasked with destroying the AI's new weapon. It turns out to be a robot child that Joshua later names "Alphie". Though given orders to kill her, Joshua takes her with him and begins to bond with her. He later learns that Maya was Nirmata after her own father, the original creator, had died.

Joshua and Alphie are taken by AI forces trying to defend themselves. Their leader, Harun, takes Joshua and Alphie to a temple where Maya lays in a coma, and it is also revealed that she created Alphie based off her and Joshua's unborn child, making her their daughter. Joshua pulls the plug on her before Colonel Howell and her forces arrive to attack. Harun throws a bomb at her, which Alphie tries to stop, but before Howell can see that Alphie is good, her soldiers break Alphie's connection to the bomb, killing Howell and the soldiers.

Joshua and Alphie are taken back to Los Angeles, where he pretends to kill her so that they can find a way to escape and sneak onto NOMAD. General Andrews orders a missile strike against all remaining AI bases, but Joshua and Alphie manage to plant an explosive on NOMAD. Before they can escape, a monstrous robot attacks them, forcing Joshua to stay behind while Alphie boards an escape pod. Joshua and Alphie say goodbye as she escapes, but he spends his final moments with a robot made to look like Maya after Alphie uploaded her consciousness to the body. NOMAD is destroyed, and the war is over.