When the U.S.S. Enterprise arrives at the newly established Starbase 173, Data is ordered to serve under Captain Bruce Maddox, who wishes to disassemble and study him so that more androids can be made for Starfleet's use.
But after Data learns that Maddox may not be able to reassemble him, he refuses to submit to the procedure. When Captain Picard is unable to have the orders changed, Data's only option is to resign from Starfleet. His decision to resign, however, is challenged by Maddox on the basis that Data is not a person with rights, but property of the Federation.
The J.A.G. (Judge Advocate General) officer of the starbase, Phillipa Louvois, an old acquaintance of Picard, rules that Maddox's contention is supported by a twenty-first century precedent. Picard announces that he will challenge that ruling at a hearing. Insufficiently staffed, Phillipa explains that as senior officer, Picard would have to defend Data, while the next most senior officer, Riker, would have to prosecute. A stickler for the law, Phillipa warns that if Riker does not give his best effort, she will summarily rule in favor of Maddox.
Faced with no other choice, Riker must contend in his prosecution that Data is simply a machine — the creation of man — and dramatically emphasizes his point by approaching Data from behind and switching him off, leaving him lifeless in his seat. Certain of his defeat, Picard has a discussion with Guinan and she suggests that the Federation's desire to create and own a race of disposable androids is the recreation of slavery.
Making an impassioned plea for Data's freedom, Picard declares that in a sense, all beings are created but that does not necessarily make them the property of their creator. Phillipa agrees with him, asserting that Data may be a machine, but he is owned by no one and has the right to make his own decisions regarding his life.