SG-1 attends a Tok'ra extraction ceremony for Ba'al, the last of the Goa'uld System Lords. He gloats that he is merely the last clone, and that the real Ba'al has a failsafe plan in the works. The real Ba'al travels back in time to 1939 Earth and massacres the crew of the Achilles, the ship carrying the Stargate to the United States, commanded by Mitchell's grandfather. In the present, people and objects begin disappearing, starting with Teal'c and Vala. Carter, Daniel and Mitchell manage to reach the Stargate. They emerge inside the derelict Achilles, which has drifted to the Arctic -- Ba'al's actions have created an alternate timeline in which the Stargate Program never happened. After escaping from the sinking Achilles, they are rescued by a team led by Jack O'Neill, though Daniel loses his leg to frostbite. Although General Landry believes their story, permission is denied to change the timeline. The three are separated and given new lives to lead.
A year passes, and SG-1 is called back into action when Goa'uld scoutships appear. Ba'al has defeated the System Lords and now stands ready to conquer Earth, with Qetesh (still residing in Vala's body) as his Queen and Teal'c as his First Prime. SG-1 is brought to President Hayes, who informs them that, based on their accounts, they have recovered the Antarctic Stargate and are excavating the Ancient outpost. SG-1 is sent on a mission to retrieve a ZPM to power the outpost. Above Earth, Ba'al's armada arrives. To the displeasure of his lieutenants, Ba'al announces that he will treat the Tau'ri leniently. Suspicious about Ba'al's knowledge of Earth, Qetesh betrays him and forces him to tell her everything. She has her ships destroy McMurdo Base and the Ancient outpost, and she kills Ba'al after Teal'c discovers them. As Teal'c escapes to a cloaked Al'kesh, Qetesh orders the fleet to begin the bombardment of Earth while she goes to secure Ba'al's time machine.
Amidst the massive Goa'uld attack, SG-1 is rerouted to Russia, as the Russians have retrieved the Stargate from the Achilles. Teal'c arrives at the facility as well, seeking to use the Stargate to reach the time machine before Qetesh does. The two sides form a tentative truce and arrive together at Ba'al's time machine: a vast underground supercomputer that monitors solar flares that can affect the wormhole formed by the Stargate. SG-1 must wait for the right flare with which to go to the past, but Qetesh's forces begin teleporting in. Teal'c, Sam, and Daniel are all mortally wounded in the firefight, and only Mitchell reaches the Stargate. In the past, he stows away in the Achilles on its trans-Atlantic voyage and kills Ba'al when he appears. Back in the present, SG-1, completely unaware of the previous events, watch the extraction proceed without incident. On Earth, Daniel wonders what Ba'al meant by his failsafe, but they decide not to dwell on it. The final shot shows a close-up of the picture in Mitchell's locker, which now has his alternate self standing alongside his grandfather.