5th episode of the third season of Star Trek: The Next Generation
director: Winrich Kolbe
screenwriter: Ronald D. Moore
Wikipedia