The Odyssey is cruising through space and Mitchell and Teal'c are sparring in the gym while wondering what is going on. Vala and most of the crew throw a party for Daniel only for him to reveal it isn't his birthday, but Vala did it anyway because she's desperately bored.
They arrive at the rendezvous spot to meet with Thor. He reveals the Asgard High Council wants to meet with them and they are prepared to upgrade the ship with everything they have. Thor announces that the Asgard are dying and will soon be gone.
Thor concedes that everything they can do to prevent their physiological degeneration has been done, but they're doomed as a race. Everything they're putting on the Odyssey will be the Asgard's legacy.
Three Ori motherships appear out of hyperspace and approach the Asgard homeworld. The Asgard disembark and the Odyssey are forced to flee on sublight because the engines are being upgraded. As the Odyssey flees, the Asgard home planet… self-destructs. They have to get clear of the radiation to go into hyperdrive and with time running out, they come around and open fire with the new Asgard weapons, destroying one of the motherships.
They go into hyperdrive but Sam reports some problems and recommends they drop out of hyperdrive. As soon as they do, two Ori motherships close in on them. They go back into hyperdrive and SG-1 wonders how the Ori were able to track them. Sam suggests they turn off the new Asgard core to see if the Ori are tracking them that way, but the core is tied into all ship's systems. Landry agrees but as soon as they emerge from hyperdrive the Ori attack again. They go back into hyperdrive but Sam warns they need at least a half hour to disengage the core or the hyperdrive will be destroyed. They find a nearby planet with a stargate and Landry suggests they self-destruct the Odyssey and leave through the gate. SG-1 don't wish to abandon the Asgard knowledge and Sam comes up with a way to get some time.
The rest of the Odyssey crew beam down to the planet while Landry and SG-1 remain and open fire on one of the motherships. The Odyssey takes heavy damage and Sam engages a device that dilates time around them, slowing everything down. She explains that months will pass for them and she'll take the Odyssey out of phase when they return into normal time, avoiding the blasts. She warns that it will take a way for her to adapt Merlin's phase technology, but they have supplies for at least three months.
Sam interacts with a holographic recreation of Thor to complete the phase device while the rest of SG-1 find ways to keep themselves from becoming bored. After a couple of weeks, Sam discovers that she can't create a device that will take themselves out of phase fast enough to either avoid the blast or teleport down to the planet. She has discovered she can use the Asgard technology to manufacture as much food and water as they need.
Time passes within the time dilation field, and Vala finally goes to see Daniel… in lingerie. He isn't interested. Mitchell gets angrier at their situation. Sam starts learning to play the cello. Vala comes onto Daniel again and he refuses yet again, not wanting to sleep with someone he works with. He doesn't trust her personally and announces it in no uncertain terms, and Vala starts crying. They end up in bed together.
Mitchell goes to confront Landry and strongly "suggest" they use the F-302s to evacuate once they return to normal time. Landry refuses to discuss the matter.
Vala goes to Sam and offers her help while Mitchell and Teal'c continue to spar. Vala brainstorms with Sam and notices the cello, then suggests they try to use it to travel back in time. It won't work.
Time passes as SG-1 pass the time, celebrating Christmas, and trying to figure out a way to escape the Ori. The stress begins to show on everyone and the Ori energy beam gets slowly closer.
Twenty years pass and everyone ages. Daniel continues to study the Asgard data banks learning as much as he can. Sam admits to the dying Landry that she's given up but he asks her to continue.
SG-1 continues to age and the Ori beam grows closer. Sam admits she's figured out a way to solve the problem but they've almost entirely depleted the ZPM and they don't have enough power to pull it off. Mitchell suggests they come up with another power source and suggest they use the incoming Ori energy beam. Sam comes up with a way to harness the energy and reverse time a few milliseconds after they've hit. She can only take them back to the point where time dilation started, where she can try and buy them a minute. However, one of them will have to stay old by being excludes from the "reset." Sam has found a way to sever the Asgard core so the Odyssey can escape into hyperdrive. Teal'c volunteers, since he ages much more slowly.
Daniel and Vala say they're "goodbyes," and they initiate the plan, with Teal'c protected in the exclusion field. The ship blows up around him as the Ori beam hits… and then time rewinds everything except Teal'c. They are back in the past and Teal'c tells Sam what to do to disengage the Asgard technology so they can escape the Ori once and for all.
Later back on Earth, Teal'c declines to tell Vala what happened in all the time that only he remembers. The team prepares to leave on yet another mission, as it's a new day and life goes on.