Sheppard, Ford, McKay, and Teyla approach a planet but the Puddle Jumper crashes due to electromagnetic interference. Using a compass, McKay homes in on the interference and they find ancient ruins. They are ambushed by teenagers and children who take them to their village. They see a shrine in the village with a Wraith skeleton, then meet the village "elder," a 24-year old Keras. Keras reveals that they made sure the Wraiths would never harvest them by killing themselves at the age of 25.
The team is reluctant to tell the kids that the reason the Wraith no longer come is because of the electromagnetic field. Keras is to die that very night, and his successor, Aries, is concerned about the SG team. While McKay and Ford investigate the ruins, McKay manages to shut down the field and finds a ZPM. Teyla advises against removing it and leaving the locals without protection. They are unaware that the Wraith skeleton that has an active signal device that begins functioning.
Weir is also unhappy with them taking the Z.P.M. and questions if there is a connection between the field and the suicide rituals. McKay determines the Z.P.M. is pretty much useless and the suicide pact is a form of population control because the device couldn't shield the entire planet. Keras asks Sheppard to stand by him at his suicide as they discover the transmitter is functioning. Sheppard destroys it, angering the locals. McKay is unable to get the EMP field working again while Keras gets the SG team released so they can go back to their ship and leave.
They break the truth to Keras while Aries raises up the locals against the SG team as they work against time to reactivate the shield. Aries catches up to them and forces them back to the ship and they go, secretly leaving McKay behind. A Wraith probe shows up and some of the kids double back to spot McKay, and he activates the field just in time. Aries shoots Keras when he intervenes and McKay arrives to tell them they're safe before violence can break out further. The SG team departs on friendly terms.