Severus Snape is a fictional character in the Harry Potter book series written by J. K. Rowling. He is characterized as a flawed, tragic or anti-hero of considerable complexity, whose coldly sarcastic and controlled exterior conceals deep emotions and anguish. In the first novel of the series, Snape is a teacher who is hostile from the start toward Harry and is built up to be the primary antagonist until the final chapters. As the series progresses, Snape's character becomes more layered and complex. Rowling does not fully reveal the details of his true loyalties until the end of the final book, Harry Potter and the Deathly Hallows. Over the course of the series, Snape's portrayal evolves from that of a malicious and partisan teacher to that of a pivotal character of considerable complexity and moral ambiguity.