"Deus Ex Machina" (from Latin, meaning "god from the machine") is the 19th episode of the first season of Lost. The episode was directed by Robert Mandel and written by Carlton Cuse and Damon Lindelof. It first aired on March 30, 2005, on ABC. The character of John Locke (Terry O'Quinn) is featured in the episode's flashbacks.
In flashbacks, a younger Locke meets a mysterious woman (Swoosie Kurtz) in the discount superstore in which he works. After an initial meeting, Locke later notices this same woman watching him in the store's parking lot. He chases after her to confront her and she explains that she is his birth mother, Emily Locke. Locke asks about his father and Emily claims that Locke doesn’t have a father because he was immaculately conceived. Undeterred, Locke hires a private investigator who finds Locke's father, Anthony Cooper (Kevin Tighe). When Locke visits his father's affluent home he is welcomed with open arms. Locke forms a strong relationship with his father, who now frequently takes him hunting. One day Locke arrives at the home early and discovers his father receiving dialysis treatment. Eventually Locke offers one of his kidneys to save his father. After the surgery, Locke wakes up in the hospital to find that his father has discharged himself home for private care and abandoned him. Emily arrives to explain that when Anthony realized he needed a kidney, he tracked down their son and paid her to make contact with him, presumably for the sole purpose of getting the transplant. Devastated, Locke pulls himself out of the hospital bed and drives to his father's home, but is regretfully turned away by the gate guard, with whom he has become friendly. As he drives away, Locke breaks down over the betrayal.
It is Day 39, October 31, 2004, on the island, Locke and Boone Carlyle (Ian Somerhalder) build a trebuchet in an effort to break open the hatch window. When this fails, an exasperated Locke pounds the hatch. Boone notices a shard in Locke's leg but Locke says he feels no pain and that night he discovers he's losing the feeling in his legs.
Meanwhile, Sawyer is suffering from headaches and Jack realizes that he is far-sighted, and requires glasses as he has been reading a lot since arriving on the island. With Sayid, he uses some of the spare glasses from the wreckage to separate and rejoin a pair of plastic glasses at the bridge with a heated knife for Sawyer to read with.
That night, in a dream, Locke tells Boone that the island will send them a sign, at which point he notices a Beechcraft 18 crash in the jungle. The dream also reveals a secret about Boone. Awaking early the next day, Locke and Boone head out in search of the aircraft. When Boone doubts him, Locke mentions the secret he learned from his dream, leading Boone to follow Locke on the hunt. They encounter a decayed body in a Catholic priest's clothing, but carrying a gun. After some searching, they discover the plane itself unsteadily lodged in the jungle tree canopy high above. Locke has lost use of his legs and asks Boone to climb up to check the plane. In the plane Boone discovers a trove of statues of the Virgin Mary filled with heroin, the body of another "priest", and a working radio. Boone sends out a distress call on the radio and a male voice answers, "Is someone out there?" to which Boone responds, "We are the survivors of the crash of Oceanic Flight 8-1-5." The voice answers "There were no survivors of the Oceanic Flight 8-1-5!" which was changed to, "No, we're the survivors of the Oceanic Flight 8-1-5" in subsequent episodes. At this point the teetering plane shifts from Boone's movements and suddenly falls to earth, crashing nose first. Frantically, Locke struggles to his feet, hoists a critically injured Boone on his shoulders, and returns to the camp.
Locke carries Boone to the cave and lies to Jack Shephard (Matthew Fox), telling him that Boone fell from a cliff while they were hunting. Jack begins treating Boone, and Locke disappears into the jungle to return to the hatch. Pounding on the door and screaming in anguish atop the hatch, Locke laments what has happened. Suddenly the hatch window is illuminated.
This was the first episode to be written by both creator Damon Lindelof and "Hearts and Minds" writer Carlton Cuse. They would go on to become the series' showrunners and writers of iconic episodes such as "Through the Looking Glass" and "The Constant".
17.75 million American viewers tuned in to this episode.