"Star Trek: The Next Generation, "Q Who?"
Star Trek: The Next Generation, "Q Who?" Season 2, episode 16 (6 May 1989).
"Q tries to prove that Picard needs him as part of their crew by hurling the Enterprise 7,000 light years away where they encounter the Borg for the first time." See for an important episode showing First Contact with the cubical, self-repairing Borg ship and "the Borg, a powerful, cyborg-like race" that is also a variety of mechanical and cybernetic hive and hive-mind and a formidable opponent.
RDE, Initial Compiler, 28Mar19 (second time?)