Arriving in the 19th century, the away team quickly locate Data, who explains the current situation. Using Data's device, the team, followed by Guinan and Samuel Clemens, is able to follow the alien shapeshifters to the same cavern near San Francisco, where they discover that the aliens traveled to the 19th century to take advantage of a cholera outbreak, draining the life force from humans in infected areas to give the impression that their deaths were the result of an epidemic. In an ensuing struggle, Data's head is severed from his body and Guinan is injured. As Picard tends to Guinan, the rest of the away team, carrying Data's body, follow one of the aliens to the future, with Clemens also following them. Picard learns from the other alien that should the Enterprise destroy their base in the 24th century, the aliens' power will be amplified. Picard places a binary message using iron filings in Data's static memory to leave instructions for his crew in the future.
In the 24th century, the crew reattaches Data's head onto Data, and discover Picard's message. They decide to mount a rescue mission to save Picard, but learn from the aliens that due to instability of the portal, only one person can return. After seeing the wonders of the 24th century, Clemens offers to go back to save Picard. Clemens returns to the cavern in the 19th century, giving Picard a device to operate the time portal himself, and offering to tend to Guinan's wounds. Picard thanks Clemens, and explains that he wishes he could have gotten to know him better, but Clemens points out that his personality is written into his books. Picard returns to the future and, with information he learned from the alien, they are able to disable the aliens' time portal.