Captain Edward Jellico (played by Ronny Cox), is hastily assigned to the Enterprise, while Picard, Worf and Dr. Crusher are re-assigned to an undercover mission crossing the Cardassian border to destroy a biological weapons installation.
Much of the episode revolves around the differences between Jellico's and Picard's command styles. Picard, while reserved, trusts those around him and relies on the professionalism of his subordinates. Jellico is much more authoritarian, demanding strict obedience and exact execution of his orders. This sudden change in command style creates friction between Jellico and the senior staff, notably Commander Riker.
Following intense holodeck training programs, Picard, Worf, and Crusher obtain covert passage to Celtris III, a Cardassian border world. The team assaults the installation, but discover that there are no biological weapons and that they have been lured there to trap Picard. Worf and Crusher are able to escape, but Picard is captured and held as a spy. The Cardassians use a truth serum to interrogate Picard as to the Federation defense strategy for Minos Korva, and he truthfully responds that he does not know.
Gul Lemec, the representative for the Cardassian Union, reveals to Jellico, Riker, and Troi that Picard has been captured. Jellico refuses to admit that Picard's mission was authorized by Starfleet. This precipitates a heated argument resulting in Riker being relieved as executive officer.
In the meantime, without the protections of the Seldonas IV Convention Governing the Treatment of Prisoners of War, Picard is tortured by his interrogator, Gul Madred (played by David Warner). Madred uses various forms of torture, including sensory deprivation, sensory bombardment, forced nakedness, stress positions, dehydration, starvation, physical pain, and cultural humiliation. This torture continues as the Enterprise negotiates with the Cardassians over the disposition of the Minos Korva sector.
The Cardassian interrogator attempts to break Picard, but rather than asking him for strategic or secret information, he asks Picard to identify the number of lights shining behind him. Although there are four lights, Madred insists that there are five and inflicts pain on Picard when he answers that there are four. (This is in reference to the novel Nineteen Eighty-Four by George Orwell where Winston Smith is tortured into admitting that 2 + 2 = 5.)
On the Enterprise, Jellico is able to determine that his Cardassian adversary's ship shows signs of exposure to a nearby nebula. Realizing that the Cardassians must have a fleet hidden in the nebula to take Minos Korva by force in the event that negotiations are unsuccessful, Jellico decides to have a shuttlecraft lay mines amongst the fleet. Jellico is forced to ask Riker to pilot the shuttle, as he is the best pilot on the ship. Riker uses this opportunity to candidly discuss Captain Jellico's flaws and forces him to personally ask for Riker to pilot the shuttle, rather than commanding him, going against Jellico's typical authoritarian manner. The mission is successful, and Jellico uses the threat of the fleet's destruction to force the Cardassians to disarm and retreat. Jellico also demands the return of Picard.
Madred comes to Picard one last time telling him that the Cardassians have attacked Minos Korva and destroyed the Enterprise. He states that Picard will never be released. He offers Picard a choice; either he can continue to be tortured for the duration of his life, or he can live in relative comfort. He must only admit that he sees five lights. Picard stares at the lights for a few moments. Madred pressures him to answer, but before Picard can answer Lemec walks in and tells Madred to prepare Picard to be returned to his ship. Thus, Madred's final ruse is exposed and Picard turns to him and defiantly yells "There are FOUR lights!"
Picard is restored as Captain of the Enterprise and Jellico moves on to another assignment. Picard and Troi have a final discussion about his torture where he reveals that he was willing to tell Madred anything to avoid more torture, but what really disturbs him is that, for just a moment, he thought he could see five lights.