“Small Victories” is episode one of season four of Stargate SG-1.
At the end of the season three finale, “Nemesis”, Thor’s ship had been deliberately destroyed (and everyone had managed to get off it safely) in order to try and destroy the Replicators on it, but, unfortunately, all the Replicators on board it hadn’t been (I seem to recall having seen that final scene before).
A Russian attack submarine (at least, it sounded like they were speaking Russian; subtitles would have been useful. This was confirmed later) in the area of the Pacific where the pieces of Thor’s ship crashed is attacked by surviving Replicators.
SG-1 finally return safely back to Earth, thinking that all the Replicators are destroyed. Until the Russian submarine is found with the crew all dead, and the Replicators are already replicating on the submarine. Plus the Russians are getting antsy, as they detected the destruction of Thor’s ship (big, visible alien vessel hitting the ocean – not that hard to detect), never mind their missing sub.
And then Thor turns up wanting help from the SGC in defeating the Replicators.