Scorpion 1 and 2

Star Trek: Voyager
Season 3, Episode 26 and Season 4, Episode 1
The “Scorpion” episodes ended Season 3 and started Season 4. This was the first appearance of Seven of Nine in the series, who is completely Borg at this point. The show introduces a new species referred to by the Borg as Species 8472. They are a huge threat to both the Borg and Starfleet. That leads Captain Janeway to make a pact with the devil and proposes Voyager and the Borg work together.
The Borg are usually capable of handling anyone but this species cannot be assimilated due to their technology being better than what the Borg currently used. That made them open to help, especially as this new threat destroyed several Borg cubes. Of course, the team-up helped and they ended up winning out. That led to Seven of Nine eventually joining the crew. The Doctor helped her to eventually rid herself of most Borg machinery to become as close to human as she could be.