Encounter at System J-25

The Enterprise-D's first meeting with the Borg

The 2365 encounter in which Q hurled the Enterprise-D thousands of light years away to System J-25, where the crew met a Borg cube for the first time.

The encounter at System J-25 was the first meeting between the USS Enterprise-D and the Borg. In 2365, in the episode Q Who, Q offers to join the crew as a guide to the dangers of the galaxy. When Jean-Luc Picard refuses, Q flings the ship some seven thousand light years away to System J-25, beyond the reach of Federation space.
There the crew find planets whose cities have been ripped from the surface, and soon meet a Borg cube. Drones board the ship to study it, and the cube carves out a section of the Enterprise's hull, killing eighteen crew members. Guinan, whose people were scattered by the Borg, warns that they cannot be reasoned with. With the ship unable to outrun the cube, Picard admits that the Federation needs help and asks Q to return them home, which he does.
The encounter alerted the Borg to the Federation's existence and set in motion the invasion that led to the Battle of Wolf 359. The episode is widely regarded as one of the series' first truly great episodes.