As Atlantis' rations run out, Teyla recommends a farm planet where they can trade for food with the Genii. The Genii greet them but are wary of the newcomers – the SG team impresses them with C-4 explosives and medical supplies. Ford and Teyla stay for a harvest ceremony while McKay and Sheppard return and consult with Weir, who agrees.
Upon their return, McKay picks up traces of radiation that they follow to a metal building that conceals a vast underground city. The Genii's leader, Cowen, confronts them in military garb and reveals they conceal their advanced military base against the Wraith under the guise of peaceful farming.
Cowen brings down Ford and Teyla and would normally have them all killed but is intrigued by Sheppard's offer of an alliance against the Wraith and keeps them alive to see what technology they can provide. They need the C-4 as the trigger for their atomic bombs with which they plan to destroy the Wraith hive ships. They believe they have decades before the Wraith return for the harvest, and are understandably upset when Sheppard reveals they woke up the Wraith early.
Sheppard manages to soothe the Genii with promises of advanced weapons technology and Cowen reveals their plan: they have the Gate coordinates of a Wraith hive-ship and plan to sneak on board and obtain the coordinates to the other hive ships. Then they will place nuclear bombs on all the ships and destroy them. Sheppard returns to inform Weir of the situation, who is initially reluctant to give up weaponry but eventually agrees . . . to an intelligence-gathering mission.
Sheppard's team goes with Cowen and Tyrus, a Genii scientist, to the Wraith hive ship. They find cocooned humans, but when Teyla tries to rescue one, Tyrus shoots him rather than alert the Wraith. Wraith guards come anyway and kill Tyrus. Teyla escapes and gets together with the others, where McKay has completed the download.
Back on the Genii homeworld, Cowen surroands the team and tries to strikes up a new deal. He wants the Jumper and the downloaded information. Anticipating a double-cross, Sheppard has two other cloaked Jumpers on standby and they depart. Unfortunately, when they decode the information they discover the Genii don't have enough bombs to deal with the 60+ hive ships . . . and Atlantis can't handle all 60 ships if they decide to attack either.