Dr. Rodney McKay leads Maj. John Sheppard, Lt. Ford and Teyla on an archeological expedition to the planet Dagan. It is one of five outposts - from the list given to them by the elder Dr. Weir ("Before I Sleep") - where the Ancients have hidden ZPMs. McKay has become a bit smitten with Allina, a Daganian archeologist.
Meanwhile, on Atlantis, Dr. Zelenka notices that the city's deep-space sensors have been activated. The problem is, neither he nor anyone else knew Atlantis had deep-space sensors. Why they've been activated is a mystery at this time.
Back on Dagan, Allina tells McKay and company about a brotherhood of 15 monks, called The Quindosim. Their sole occupation was to keep safe the Pontentia, or ZPM. It was entrusted to them 10,000 years ago by a Lantian (their name for the Ancients), who told them to defend it until his people returned to reclaim it. In exchange, the Lantians will one day reward the Sudarian people for completing their task. But the brotherhood fell to the Wraith, taking their secrets with them.
Having anticipated their destruction by the Wraith, however, the Brotherhood left clues in the form of nine stone markers that, when united, would reveal the hiding place of the ZPM. So far, Allina and her team have found only three - each one with ancient numerals etched into it. McKay sets the stones upon a map of the land and is able to extrapolate a grid indicating where the other stones are buried.
The dig begins. Eight of the stones are found. Lt. Ford finds the entrance to a secret chamber deep below the surface. Inside the chamber they find an altar with palm indentations on both sides and nine indentions for the stones. The eight stones placed in order leave the center square empty. McKay realizes that the stones' Ancient symbols now read like a gate address to the planet where the ninth stone is hidden.
Then comes a big surprise: Commander Acastus Kolya of the Genii, sworn enemies of the Alantians, calls down to Sheppard, who thought he'd killed Kolya when he and his men tried to take Atlantis ("The Storm"). Kolya tells Sheppard that he knows from his spy on Dagan that they are looking for the lost treasure of the Quindosim. Sheppard tells Kolya that the ZPM is only of use on Atlantis, but Kolya would rather hear that from a Genii scientist. Outgunned by Kolya and his men and trapped in the underground chamber, McKay agrees to help find the ZPM for Kolya. McKay and Allina are raised up, along with the team's weapons and radios. Kolya gives his word that if they find the ZPM, the others will be set free.
Back at Atlantis, Dr. Zelenka has configured his computers to work with the deep-space sensors and has discovered that a Wraith Dart is only 27 minutes away. Weir orders three jumpers in the air - one of them reluctantly piloted by Dr. Beckett. One of the jumpers is destroyed by the dart, which then self-destructs - but not before it scans Atlantis and transmits its data.
On Dagan, McKay dials the gate address, but it doesn't work. Back at the monastery, he and Allina discover that the mural on the wall - a layout of Suderia as it was in the Brotherhood's time - has all 36 gate symbols incorporated along its border. By aligning the symbols on the stones to the ones on the mural, they triangulate the exact position of the ninth stone. McKay cuts a hole in the mural at that exact spot and finds the ninth stone hidden there.
Back in the secret chamber, the stone is placed in the empty spot. One of Kolya's men puts his palms on the indentations and is instantly poisoned by hidden spikes. The order of the stones is wrong and Kolya gives Sheppard, Teyla, McKay and Ford each a chance to get it right: Sheppard goes first and suddenly figures out that the answer to the puzzle lies in the Brotherhood of the 15: The numbers 1-9 can be put in a 3x3 grid so they add up to 15 in every direction. It works. The ZPM is ejected from the stone wall. Then, on Sheppard's signal, Ford takes his foot off the lever of a stun grenade they buried in the dirt floor. Kolya and his men are blinded and disabled in the fight that ensues. Sheppard leaves the battered Kolya trapped in the chamber.
Topside, Sheppard and company get a rude awakening when dozens of armed Daganians come out of the woods and take the ZPM. Allina explains that she is a member of the New Brotherhood and that the Pontentia must go into hiding on another world until the Lantians come to claim it and reward them. She would have turned it over to McKay, but he let it slip earlier that he and his team are from Earth and not Ancients.
Back at Atlantis, Weir is disappointed, especially since the deep-space sensors have revealed that three Wraith hive ships are headed straight toward Atlantis and will arrive within two weeks.