Star Trek: The Next Generation / Season 6 / Episode 12

Ship in a Bottle

A glitch in a Sherlock Holmes program leads Barclay to a forgotten file. Inside is Professor Moriarty, who has been waiting four years and would like a word with the captain.

  • First aired the week of Jan 25, 1993 · Syndication
  • Directed by Alexander Singer
  • Written by René Echevarria
  • Guest starring Daniel Davis and Stephanie Beacham
Still from Star Trek: The Next Generation, "Ship in a Bottle"
Still from Star Trek: The Next Generation, "Ship in a Bottle"
Image via TMDB
Star Trek: The Next Generation, "Ship in a Bottle" (Syndication, 1993). Image via TMDB.

The story in 5 beats

  1. Wrong hand

    A character in Data's Holmes program is suddenly the wrong way round. Barclay is called in to fix it.

  2. The file

    Barclay finds Moriarty in protected memory. He remembers everything, including being switched off.

  3. The doors

    Moriarty steps off the holodeck and doesn't vanish. Now he wants the same for the countess he loves.

  4. Command codesSpoiler · tap to reveal

    Data notices something wrong with the ship, and Moriarty has the keys to it.

  5. End programSpoiler · tap to reveal

    Picard sends the couple off to see the galaxy. Barclay tries one last command, just in case.

Why it still matters

In 1988's "Elementary, Dear Data," a holodeck Moriarty realized he was a program, and Picard promised to look for a way to let him out. Then the show saved him to memory and moved on. This is the episode that remembers. Moriarty has been aware the whole time he was switched off, which should be impossible, and he's had four years to get angry about the promise.

René Echevarria's script turns a holodeck repair job into a philosophy exam. Moriarty quotes Descartes, "I think, therefore I am," and walks out through the doors as if that settles it. The crew's answer is a trick, and a kind one, and the last scene quietly turns the question back on them. The Hollywood Reporter ranked it 21st on its 2016 list of the 100 best Star Trek episodes.

Spoilers from here on. The trick works better if you don't see it coming.

A bottle inside a bottle

Moriarty never left the holodeck. The Enterprise that Picard, Data and Barclay have been walking around is Moriarty's own simulation, and believing he was on his real ship, Picard handed over his command codes. Moriarty uses them to take control of the real one. So Picard does the same thing back: he builds a program inside the program, in which Moriarty and Countess Regina seem to beam out into the real world and leave in a shuttlecraft to explore. Satisfied, Moriarty returns the ship.

Barclay moves the couple's memory cube to a device that can keep their voyage running for a lifetime. Picard muses that their own reality might be nothing more than a little device sitting on someone's table. Left alone, Barclay says, "Computer, end program." Nothing happens. Probably.

The Question Underneath

Is a life less real if it isn't the one you asked for?

Moriarty wants to live in the real world, and the crew trick him by giving him a world that only looks real. It's a happy ending with a sting. Picard's closing thought, that their own reality might be someone else's program, turns the trick back on the audience. Moriarty gets a lifetime of exploring. Whether that counts as cheating him depends on what you think makes a life real.

Challenge the DNA

Was tricking Moriarty fair?

Was tricking Moriarty fair?
Or skip ahead to our reading

Fair enough, and kinder than it looks. He gets the voyage he asked for, for a lifetime. The question the episode leaves is whether the crew got any more than that.

Behind the scenes

  • Moriarty first appeared in "Elementary, Dear Data" in 1988 and didn't come back for four years. The usual explanation is that the Conan Doyle estate wanted a fee for the Holmes characters. The estate later told Gizmodo that story is a myth and that Paramount had asked permission in advance, so how real the problem was is still argued about.
  • Daniel Davis returned as Moriarty, with Stephanie Beacham as Countess Regina Bartholomew. Dwight Schultz, who plays Barclay, was best known as Murdock on The A-Team.
  • It aired a few weeks after Deep Space Nine premiered with "Emissary" on January 3, 1993.
  • Davis played Moriarty a third time thirty years later, in Star Trek: Picard's "The Bounty" (2023).
  • In 2016 TIME ranked Moriarty fifth among Star Trek's villains.

The thread

Where Moriarty came from, the questions he borrowed, and where he turned up next.

Came before

Discourse on the MethodRené Descartes · 1637 · "I think, therefore I am," the line Moriarty walks out on

Shares DNA with

Left its mark on

Star Trek: Picard, "The Bounty"2023 · Daniel Davis's third turn as Moriarty, thirty years on

DNA strand

Is Any of This Real?

The question isn't really whether Moriarty is real. It's whether anyone can tell which room they're standing in, and by the last scene the crew is no surer than he is.

Every great sci-fi story is built from a handful of strands like this one. Each strand page explains how it works and traces it across shows, books and films.

Also in this strand:"Hang the DJ"The MatrixExplore this strand →

If this one stayed with you

Where to go next, and why.

Watch · Star Trek: TNG

"Elementary, Dear Data"

Watch it first. By the end you'll understand exactly why Moriarty is annoyed.

Watch · Black Mirror

"Hang the DJ"

Another couple, another question about what's on the other side of the wall. Go in knowing nothing.

Read · Short story

"The Final Problem" — Arthur Conan Doyle

The original Moriarty, introduced and dispatched in a single story. He's had a long afterlife for a man with so few pages.

Your next episode

Three directions to go from here, all on Sci-Fi DNA.

Still from Star Trek: The Next Generation, "Cause and Effect"

More of this feeling

Cause and Effect

Star Trek: The Next Generation

Another TNG puzzle box where the crew has to work out what's really going on, fast.

Still from Star Trek: The Next Generation, "The Measure of a Man"

Same question, different answer

The Measure of a Man

Star Trek: The Next Generation

Is a program a person? Here the question goes to court, and Picard argues the other side.

Still from The Twilight Zone, "The Shelter"

Something completely different

The Shelter

The Twilight Zone

No computers, no holodeck, just neighbors and a locked basement door.

On the trail Can a machine love you back? (stop 4 of 5).

Sources