"The Offspring" is the 16th episode of the third season of the science fiction television series Star Trek: The Next Generation, and the 64th episode of the series overall.
The android Data creates a "child" of his own named Lal and tries to raise her, while Picard takes on Starfleet Research to keep them from taking her away.
Data invites Deanna Troi, Wesley Crusher, and Geordi La Forge to his lab and surprises them by introducing a featureless humanoid android, whom he created based on his own structural design and recent advances in Federation cybernetics technology, describing it as his child. He names the android Lal (after the Hindi word for "beloved") and encourages it to select a gender and appearance. With Troi's assistance and considering many of the on-board species as well as the databanks, Lal narrows down to four possibilities, including a Klingon male, which, as Troi points out, would make it "a friend for Worf", but in the end selects the appearance of a young female human.
Data first aids Lal with cognitive and standard behavioral algorithms, as well encourages her to interact with other members of the crew to learn behavioral and social customs. After a failed attempt to place her in school, due to the other children being intimidated by her, he places her under Guinan's care at Ten-Forward. This leads to some awkward moments, such as Lal misunderstanding the concept of flirting and kissing, which she first interpreted as "attacking" until Guinan makes an effort at explaining the practice. Intrigued by this, Lal engages in suddenly dragging and kissing Commander Riker over the bar, leaving him baffled and earning him a fatherly scolding à la "what are your intentions towards my daughter?" when Data walks in on them. Lal nevertheless adapts very quickly, even, to everyone's amazement, surpassing Data as stated by her ability to use contractions, something Data never achieved.
Captain Jean-Luc Picard, being informed about Lal and her progress, expresses concern to Data for constructing Lal in secrecy, but Data reminds him that he would not express such concern were two human crewmembers to decide to procreate, to which the captain has little argument. Nevertheless, Picard, as per general orders, reports to Starfleet, prompting Admiral Haftel to arrive to evaluate Lal. From the outset, Haftel is determined to transfer Lal to a Starfleet science facility. He interviews Lal, where she reveals her desire to remain on the Enterprise with her father, but Haftel is unmoved.
Upon leaving the meeting, Lal visits Troi in the counselor's quarters. Lal is clearly confused and distraught, and to Troi's amazement, reveals that she is experiencing fear. Experiencing an overload of information and emotions, Lal soon stops speaking and wanders off, eventually returning to Data's lab (as she is programmed to do in the event of a malfunction).
In the meantime, Haftel meets with Data and orders him to release Lal into Starfleet's custody. Though Data moves to comply, Picard orders him to stand fast and reminds him and the Admiral that Data is a sentient life form with defined rights and cannot be ordered to turn what is in essence his child over to the state. But before the discussion can get any more tense, they are interrupted by a call from Troi who explains what has happened to Lal and asks everyone to come to Data's lab at once.
Upon arriving, Data's diagnostics find Lal's emotional outburst is a symptom of a cascade failure in her positronic brain, and they must work fast to stop it. Haftel, seeing Data's sincerity, offers to assist Data, who accepts. Some time later, a worn-out Haftel leaves the lab and informs Troi, Wesley, and Geordi that they have failed. Visibly moved at Data's determination to save his child, Haftel explains the failure was irreparable. He is visibly overwhelmed himself, concluding that Lal will not survive for long. Data apologizes to Lal that he could not save her, but Lal thanks Data for her creation. She lets him know she loves him and will feel the emotion for both of them. Data returns to the bridge, and Picard conveys the crew's condolences, but Data reveals that he has downloaded Lal's memories into his own neural net, allowing Lal's memories and experiences to live on.