Millions of years ago, in a distant galaxy, a group gathered in their town to decide not to hide their scientific and rational ways from the Ori, who are massed to destroy them. One of their members, Amelius, suggests they use the Ark to convert people but the other leaders disagree and warn against the danger it presents. They close debate on the issue of using the Ark against the Ori and a disappointed Amelius turns away to close the Ark.
In the present day, SG-1 is exploring an ancient ruin on Dakara and Daniel finds the Ark, which he has been looking for and knows what it's done. Vala suggests they open it but Daniel is more cautious. As she gets more impatient, Daniel finally explains that it's sealed and they can't open it. She prepares to hack it open but Teal'c interrupts their bickering as ships fly over and open fire. Sam and Mitchell hold off the ground forces but are forced to fall back and there's no other way out. Daniel has no choice but to open the Ark as the Ori forces' leader arrives: Tomin. He tries to get them to surrender in return for his promise not to harm them but they refuse, and Vala suggests they let Tomin and his men open it. Vala invites them in but an Ori Prior arrives. Daniel notes it's an item that can destroy the armies of the Ori and he shouldn't open it, so naturally the Prior tells his men to open it. Tomin blasts it open but the only thing inside is a scroll. The Prior orders Tomin to kill them but he refuses and the Prior questions his loyalty. Tomin turns and prepares to kill them but Vala appeals to her husband. Tomin hesitates and Daniel says the Prior knows he is powerless. Mitchell grabs a weapon and shoots the Prior . Sam shows them a nullifier that they brought, and Tomin contemplates the Prior's body as he realizes he's served a false god.
At SG command, they discuss Tomin's information that the Ori are planning a new assault through the Supergate. Mitchell meets with Landry who reveals they have a visitor: James Marrick, IOA Oversight and Woolsey's replacement. Marrick praises them and says he'll stay out of his way, then drops the other shoe and reveals that he'll be interrogating Tomin. He doesn't believe Mitchell who thinks Tomin is sincere in his conversion and insists on the interrogation. Meanwhile, Daniel and Vala to explain to Tomin that they sent a weapon through the Supergate but they need the Ark to stop the potential bloodbath. Tomin is skeptical when Daniel says he had a vision from when he shared his consciousness with Merlin, a vision of a mountain exploding. Tomin recalls a legend from the Book of Origin that tells of of a mountain in the Ori galaxy that erupted and buried a city of evil.
In the past, Amelius programs the Ark as he and the others prepare to leave. He remembers to take his notebook with him and they leave, taking a spaceship through the top of the mountain and into space.
Sam proposes a plan to teleport four nuclear devices onto the Supergate and going off when an incoming wormhole is created. However, Daniel comes in to reveal that they still need the Supergate to get to the Ori galaxy to find the Ark.
Marrick interrogates Tomin and reviews his career following the orders of the Priors, and how many innocents he slaughtered. Mitchell and Teal'c watch through the one-way mirror. Afterward, they get news that Marrick has approved their mission and they'll be taking the Odyssey. However, Marrick will be overseeing the mission, but Landry gives his blessing to have Mitchell confine him to quarters.
As the Odyssey heads for the Supergate, Marrick watches Tomin as Teal'c sits down with the former Ori. Teal'c expresses his sympathy and understanding as a traitor himself, a commander who slaughtered innocents. He warns that Tomin will never forgive himself, even if others do, but he must fight for others.
The Odyssey arrives at the Supergate and passes through to the Ori galaxy. On the other side Vala and Daniel infiltrate a village dressed as locals, and at a local tavern Mitchell sees a man who resembles Merlin. Tomin brings over Hertis, who relates that the fires of Celestis have gone out. He's forced to explain that the Priors consider it a sign that the Ori are displeased so they are preparing for an invasion. Hertis demands proof that they're speaking the truth and they take him up to the Odyssey in orbit. He directs them to the ruins of the "Birthplace of Evil," on Celestis. They suspect the Ori are dead thanks to Merlin's devices, but the Priors are still alive. Marrick finds out about Hertis' presence and isn't happy about being left out of the loop. He demands to know if they have reliable intelligence about the Ori invasion but Mitchell insists on searching for the Ark and tells Marrick to replace him or get out of his face. Marrick backs down... for now.
The Odyssey arrives at Celestis and SG-1 beams down to the planet along with Tomin. On board the ship, Marrick sneaks into a restricted area and inserts a special control rod into the Asgard core. He then opens a viewer and looks out into space.
On the planet, Vala talks to Tomin while Marks calls Mitchell to inform him that Marrick has locked himself into the Asgard control room and activated the core, alerting the Ori. Sam and Mitchell beam up to the ship while Daniel and Teal'c keep searching for the Ark.
At SGG, Landry receives a message from SG-3 saying a Prior has contacted them and waits to arrange a meeting, knowing they can render him powerless. Landry agrees to the meeting.
Sam manages to bypass the security lock and Marrick says that he plans to stop an Ori invasion at all costs. Marrick says they have another option and reveals that he has used the core to create a Replicator.
On Celestis, Daniel has another vision of Merlin disappearing at a particular spot. They find a stone slab and pull it aside to reveal a passageway going down.
Marrick reveals that the Replicator is contained within a forcefield and the IOA plan is to lure the Ori in and then unleash the Replicators on them. Mitchell gets an ARG and opens fire on the Replicator, but it's immune to the energy and escapes into the ship. Marrick is satisfied and notes that they've put a shutdown command into the Replicator programming. Teams spread out through the ship to find the Replicator while Sam notes that they need to turn the Asgard back on to access the shutdown programming... which will attract the Ori even if they try to escape into hyperspace.
Mitchell contacts Daniel and the others but the ship's computer cuts off as the Replicator takes over the system and cuts off the teleporter and communications. Daniel and the others have no choice but to proceed into the tunnels. They find rubble blocking the tunnel and are forced to use explosives to clear it.
Mitchell joins the hunt for the Replicator as the power starts to fluctuate. In the tunnels, the team finds the Ark.
On Earth, the Prior arrives and confronts Landry, giving him the chance to surrender on behalf of Earth and convert to Origin. Landry turns down his offer and taunts the Prior, who doesn't say anything. Landry suspects the Priors are desperate because the Ori are dead but the Prior says he is without reason and Earth will burn. The general is unimpressed.
Aboard the Odyssey, Mitchell tracks the Replicator to the rear auxiliary control room and manages to destroy it. However, other ones move in and Mitchell is forced to flee. Sam tries to tell him to find the queen but loses contact.
Daniel gets the Ark open and but it's not turned on. He tries to decipher the symbols on the outside but the tunnels are unstable and they carry it to the surface.
Mitchell hides in an access tunnel to avoid the Replicators while four Ori motherships surround the Odyssey. Sam takes the ship into hyperspace just in time, aware that the Ori can track and follow them.
On the planet, Teal'c tries to establish contact with the ship when Ori troopers open fire, wounding and knocking him out. His teammates return fire but it looks hopeless.
Sam warns that the Replicators will head for the Asgard core room and have already locked down the hatches and bulkheads. She figures the queen is set up close to a power conduit and they seal the core room while Mitchell goes to look for the queen. In his cell Marrick hears a clattering noise and calls for help. There's no response and the Replicators enter the cell and he screams in agony.
Teal'c wakes up to find dead Ori soldiers on the ground and Vala, Daniel, and Tomin gone. He's unable to contact the Odyssey and limps away across the countryside.
Daniel and the others were taken away by the Ori, and tossed in cells. Doci and other Priors torture them.
The remaining Odyssey crew prepare to hold off the Replicators at the core room while Mitchell finds the queen. Sam tells him not to destroy it until they have the shutdown code, or need a distraction. Mitchell plants explosives and comes face to face with... Marrick. As Sam works to find the shutdown code, Mitchell realizes that Marrick has been taken over by Replicators that have entered his body. Marrick easily disarms him with enhanced strength and moves in for the kill.
Vala is taken to the Ark where her daughter Adria, glowing with energy, is waiting for her.
The Replicators move in on the core room and the troops try to hold them off. Sam discovers there is no shutdown code so she starts writing one.
Adria informs Vala that the Ori were destroyed but now that she has Ascended, she is receiving all the energy from the Ori's followers. She insists that people must see her for what she really is so doesn't want to use the Ark. Vala doesn't believe that explanation, noting the Ark only convinces people to believe what is true.
Teal'c walks across the plains of Celestis until he comes within sight of the Ori city... and collapses.
The converted Marrick tosses Mitchell around while the soldiers are running out of ammo. Sam calls Mitchell to attack the queen and provide a distraction, and he tries to stab Marrick. He manages to put a knife in his shoulder but drops the detonator. Marrick picks it up and tosses it away, but Mitchell manages to get to his gun and keep Marrick from stabbing him long enough to knock the knife away.
A ghostly figure appears over Teal'c and heals his wound. A determined Teal'c heads for the city to rescue his friends.
Vala tries to talk reason to Adria but she believes the Ancients will destroy her and she must wipe them from existence. She then senses something and leaves the chamber. As she does, the symbols on the Ark glow briefly but Vala barely notices and leaves to rescue the others.
Seven Ori motherships arrive in Earth's system and wait. Colonel Ellis warns that they are seriously out gunned but Landry prepares to fight.
The Replicators drop the Odyssey out of hyperdrive and the Ori move in for the kill. Replicators make their way into the core room while the Ori open fire. Marrick pins Mitchell to the wall but the latter manages to pull out the Replicator control arm from his spine and Marrick begs to be killed and says he doesn't know the shutdown code but it's o the other side of the crystal. The Replicators retake control but Mitchell electrocutes Marrick with a power cable.
In his cell, Daniel sees the ghostly figure of Merlin, who advises him to find the strength necessary. An exhausted Daniel dismisses the figure, realizing it's Morgan Le Fay. She notes she was exiled for interfering once but after opposing Merlin, she now realizes Merlin was right. Daniel suggests the Ancients help them but Morgan says that Adria is too powerful for her. She explains that if they can turn one Prior using the Ark, then it will spread through the staff crystals to the other Priors Adria's power will be diminished and she can be defeated. A hooded Ori arrives at Daniel's cell, and reveals himself as Teal'c.
Mitchell radios Marrick's message to Sam without understanding it, then sees Marrick approaching. He activates the explosives, engulfing Marrick in a fireball and distracting the Replicators while falling to the ground unconscious.
Vala frees Tomin and promises him that everything will be okay. Daniel and Teal'c join them and they go to find the Ark.
Sam gets to core console and finds the crystal that Marrick inserted earlier. Mitchell recovers consciousness only to see the Replicators take on the form of Marrick's skeleton while other Replicators move in on him in their natural forms. Sam manages to access the crystal and activate the shutdown code... and all of the Replicators shut down.
Daniel and the others go to the Ark chamber and Vala tries to describe the glowing symbols she saw earlier. Daniel tries to enter the proper sequence while Doci enters the chamber. Teal'c and Tomin are powerless against him.
With the Replicators neutralized, Mitchell gets to the bridge and offers surrender, but the Ori continue to fire. The hyperdrive is offline and they can't take many more hits.
Adria returns to the Ark chambers and tells them that they've lost. Vala and Daniel exchange a look and then Vala apologizes to her daughter and notes they're never going to agree. Daniel takes advantage of the distraction but Adria realizes what she's doing and knocks Daniel away just as he opens the Ark. Teal'c shoots the support of the table it's on, knocking it down and activating it. The beam of light strikes Doci and spreads to all the other Priors across their galaxy, including the ones attacking the Odyssey The Ark shuts off but Doci has seen the truth and Morgan steps in to battle the depowered Adria. The two convert into light forms and battle, and Adria is defeated. Daniel realize the key sequence to open the Ark is "Origin."
On Earth, Landry confronts the Prior and returns his staff to him. They then show him the Ark. Sam visits a recovering Mitchell and explains that when they converted "their" Prior it converted all the ones in their galaxy. The Ori motherships have retreated and she says the IOA want to meet with Mitchell to offer an apology. He notices she's carrying a bag and she reveals she made macaroons for him. She gives him a kiss on the cheek and leaves. Mitchell smells the macaroon and smiles.
Tomin has donned his uniform and considers himself in a mirror, and notes to Vala that it was the teachings of Origin that gave him strength during his torture session. He still believes in its teachings and plans to do some revisions. He suggests that she go with him but she thinks her place is with SG-1 and declines.
Daniel warns Landry that the Ark is a dangerous weapon if it falls into the wrong hands but it's been taken to Area 51 and there's nothing Landry can do about it.
SG-1 banter back and forth, while Mitchell wonders what they'll do next. They head for the Gate and prepare to explore their next planet, whatever it may be.