If I remember correctly, in Attack on Titan, it's mentioned or implied a number of times that humans built the walls to protect themselves from the titans. (Feel free to correct me if I'm wrong on this.) If so then, how did they manage to get the walls erected (which seem to be the result of somewhat extensive work) without getting killed, if they were already under attack by that point?
(Note: I'm only about halfway through the anime series, so I might just be missing something that appears later.)