Just as Thomas is attempting to exit the city with his friends, Teresa decides to lure him back to the lab by telling him through a city-wide speaker system that his blood can save everyone from certain infection. It's a little disingenuous, of course, considering the whole city is on fire, but Thomas can't help but be the good guy — he tries heading back to turn himself in. Unfortunately, upon his arrival and Ava's (Patricia Clarkson) promise to take care of his friends in exchange for his cooperation, her sniveling henchman Janson (Aidan Gillen) decides it's the perfect time to betray the WCKD boss, and leaves her bleeding out on the floor. He then incapacitates Thomas and takes him hostage. As it turns out, Janson has become infected, too, and wants the cure for himself.
Although Teresa works to produce an injectable vial of the serum, she's not crazy about giving it to Janson, so she knocks him out (temporarily) before he can take it. This leads to a skirmish after Thomas removes his bindings, and the two have to throw Janson to a pair of infecteds to escape his terrible clutches. Unfortunately, "escape" is relative at this point — they find themselves on the roof of the burning building as mass chaos continues to erupt outside.
Although Jorge (Giancarlo Esposito) is able to get a hovercraft to the roof through a major movie miracle and rescue Thomas, it's too late for Teresa, who's caught in the building's collapse and perishes right before everyone's eyes. (Just when you thought they might be able to rekindle their romance after all.) And with that, apart from whomever may have been able to get airlifted to safety, WCKD as we know it is history.