After Data learns of his own death in late- 19th-century San Francisco, a freak accident transports him back to that period.
The Enterprise crew travels between the 19th and 24th centuries in an attempt to prevent Data's death in 19th century San Francisco.