Rodney McKay finds himself in his lab in Atlantis with no idea where he is - or who he is. Waiting on a computer nearby is a video recording of himself from earlier. The McKay on the screen orders him to find Teyla and warns him that hundreds of people will die if he fails. There's a picture of Teyla in the message, which is good, because McKay can't remember who she is, either.
He has barely begun searching for her when he encounters Maj. Lorne and a team of Marines. They don't recognize him; instead, they shoot him with a stun gun and drag him to the mess hall, where they've confined almost the entire Atlantis Expedition. No one remembers anything, and Teyla isn't there. McKay collaborates with Samantha Carter to escape. Once they're free, they join forces with Radek Zelenka, then secretly follow Lorne and his men, hoping to find some answers.
In fact, a survey team has accidentally infected the city's population with a bacterial disease that causes progressively worsening amnesia and is ultimately fatal. Earlier, with the infirmary overcrowded, Carter and Sheppard asked everyone to convene in the mess hall for medical care and ordered Lorne and his men to bring in stragglers.
When Teyla and Ronon realized that they weren't affected, Dr. Keller - already battling the first symptoms herself - discovered that the illness was a mutated version of Kirsan fever, a familiar childhood ailment in the Pegasus galaxy. Teyla and Ronon were immune because they'd had it as kids. Better yet, they knew that the sap of the common Enchuri plant could cure it.
Ronon and Sheppard flew a Jumper to the planet's mainland to harvest the plant while Teyla helped an increasingly forgetful McKay modify the city's ventilation system to distribute the cure. Then Lorne's men - forgetting everything except their orders to round people up - captured Teyla. That's when McKay made his videotaped message to himself, knowing that without Teyla's help, he would soon forget his job.
Now, McKay, Carter and Zelenka - still trailing Lorne's team - arrive at the city's brig. They stun Lorne and discover Teyla locked in a cell. Teyla helps McKay finish the ventilation system modifications, but until Ronon and Sheppard come back, there's little else she can do.
Meanwhile, on the mainland, Ronon returns from gathering the Enchuri plant to find Sheppard aiming a gun at him. Sheppard has completely lost his memory and guesses that it's Ronon's fault. Ronon must win his trust and persuade him to fly the cure back to the city. If he fails, McKay's videotaped prediction of hundreds of deaths will come true.