On stardate 41798.2, the USS Enterprise searches the Lorenze Cluster for the USS Drake which has mysteriously vanished during a survey of the planet Minos. Reports indicate that the planet is uninhabited but was once home to an advanced civilization known as the Minoans who were arms merchants during the Ersalrope Wars, manufacturing highly advanced weaponry for both sides of the war.
Upon entering orbit, the Enterprise receives a hail from the planet. A cheerful man with a rolling voice appears on the screen announcing greetings from Minos, "The Arsenal of Freedom." Captain Picard tries to respond, but the figure talks over himâan obviously pre-recorded message. Commander Riker heads a small away team and beams down with Lt. Commander Data and Lieutenant Tasha Yar.
The three arrive in an area overgrown by ferns, filled with the sounds of birds and insects. Riker hears a voice behind him say "Hello." Turning, he sees Captain Paul Rice, commander of the Drake, appear from nowhere. Riker asks what happened to the Drake and her crew but Rice eludes his questions. Sensor scans indicate that the only life signs are the away team's, meaning Rice is obviously a projection. Riker becomes suspicious and when Rice asks who sent them, Riker replies, "Your mother. She's worried about you."
Rice then asks about the Enterprise, wondering what kind of defensive systems she has. Riker plays along, saying his ship is called the Lollipop (assuring Rice that "it's a good ship"). Rice then asks about the capabilities of the Lollipop since he's never heard of it. Riker makes up some confusing numbers and dodges his other questions, then tells Rice he's noticed he hasn't addressed him by his first name yet. Rice hesitates, searching for a response, but Riker knows he is unable to answer the question because he isn't real.
The image of Rice fades to reveal some kind of robotic sentry that fires a beam which encases Riker in a bubble of energy. Tasha fires her phaser at the sentry and destroys it, then informs Picard of the situation. He orders the transporter room to beam them up immediately, but they are unable to get a lock. Data reports that Riker is in some sort of stasis; he theorizes that the purpose for the containment is storage, guessing, sooner or later, that something will come along to collect him. Picard tells them he is beaming down. He orders Dr. Crusher to accompany him, and leaves La Forge in command.
Picard and Crusher beam down to check on Riker. Picard says he had heard of a similar intelligence-gathering system used during the Ersalrope Wars which projects an image of someone of trust in order to obtain tactical information. If that didn't work, the device would immobilize the subject so they could be brought in for interrogation. Worf calls down to warn them of another energy reading at their location. Before they can react, another sentry appears and fires at them. This drone seems to react better to their counterattack than the last one did. The team runs in all directions to take cover. Picard and Dr. Crusher head to a clearing where the ground seems to swallow them up. Picard tries to catch Beverly, but they both fall through to a chamber below. Picard lands in a safe position atop of a pile of sand, but Beverly is half buried under rubble. Picard clears it away before she suffocates.
Meanwhile, the sentry chases Data and Yar. When the drone is in range, they both fire at once; since it can't dodge two blasts at one time, it is hit and explodes. The pair head back toward the Captain and Doctor but find they have vanished. Yar tries to contact the Enterprise, but the communicators are rendered useless. Underground, Picard tends to Beverly's injuries. She has a broken arm and multiple lacerations. Picard tries his communicator but it is also inoperative. Back on the surface, Data manages to free Riker from the stasis field with a carefully set blast from his phaser. Riker is alive, but disoriented.
Back on the Enterprise, Worf detects a small object nearing the ship. A small probe, not unlike the ones on the planet, appears and fires a ray. The Enterprise shakes violently. Before Worf gets a lock on the object it disappears. Confused, Worf scans again, finding it has moved astern. It fires again, wrenching the ship, then disappears once more.
Just then, Chief Engineer Logan enters the bridge. He demands to know why they haven't left orbit yet, stating he should take command since he outranks La Forge; Geordi explains Picard left him in command of the ship. Logan argues that Picard didn't know the ship would be attacked. Worf tracks the probe coming around for another pass, saying it is using some kind of cloaking device. La Forge tells Logan to get back to engineering and pump all the power into the shields. Logan reluctantly obeys.
Back on the planet, the team searches for Picard and Dr. Crusher. Data detects a third sentry headed their way, but this one is protected by a shield. He surmises that these products are able to upgrade themselves. When the drone appears, they ambush it from all sides. The shield doesn't hold up against three phaser blasts, and the sentry explodes. Yar wonders how many more will show up, and Data responds that he estimates a 12 minute period between the arrival of each drone.
Down in the cavern, Picard tends to Beverly but she has lost the medical kit. He has to make do with what roots and leaves he can find to craft makeshift bandages. Losing blood, Beverly drifts in and out of consciousness. He orders her to keep talking and stay awake because he needs her help, but she is going into shock.
The battle above the planet is still waging as the probe continues its unrelenting attack. Shields are collapsing, and the situation is desperate. Geordi calls Logan to the bridge and orders the ship to leave orbit of the planet. Geordi tells Logan to take command of the saucer section; he'll split the ship and head back with the battle section to rescue the others. Geordi takes Worf and two crewmen to the battle bridge as the Enterprise separates.
Back in the cavern, Picard notices a flicker of light behind some heavy overgrowth and clears it away. He is amazed to find what looks like a computer terminal. Above him, Data discovers they are standing upon an artificial structure. He finds an air vent leading underground. Below, Picard looks over the ancient computer system. He presses some buttons and is startled when a hologram of the salesman appears before him. The salesman goes over the details of the system, explaining that they have devised the perfect killing system of intelligent weapons. Picard realizes the Minoans were poor fools. The first time they activated this defense system, something must have gone wrong and they were destroyed by their own creation. Picard interrupts the sales pitch and tells the salesman to stop the drones; the salesman insists on completing the demonstration.
Riker calls down the air shaft. Picard runs to the hole and warns them the defense system is about to attack again. Data announces that he can survive the drop and leaps down to land safely. Riker and Yar run to find cover. Picard shows Data the computer terminal indicating that a drone has been launched and is heading for their location. They have to find a way to shut it down. Data begins to tamper with the programming schematics and Picard asks Data if it's possible to change the target parameters. He tells Data to set it to attack the power systems of the machinery that built it, but Data warns him the explosion would destroy the entire system, and them along with it.
Beverly speaks up, saying, "Just shut it off!" Picard turns to the salesman and tells him to shut it down, but the salesman indicates they haven't seen half of what it can do. Picard demands he shut it off, now! The salesman asks, "Does that mean you are going to buy it?" Picard shouts, "Yes! You've made the sale!" The salesman smiles saying, "You won't be sorry". He vanishes and the system powers down.
Picard calls to the Enterprise, but the ship is busy at the moment. The Battle Section is still engaged with the drone. It takes pot shots at them and pulls its disappearing trick, making it impossible to track. Geordi takes the Battle Section into a risky nosedive until it's inside the planet's atmosphere. The cloaked probe gives chase, but as it does so, the friction of the atmosphere makes a visible disturbance. Worf targets the fireball and annihilates the drone. The Enterprise heads out of the atmosphere, beaming up the stranded away team at the same time. The attack is over, and the Enterprise heads back to rendezvous with the saucer section.