A Storm of Swords
The sections of George R. R. Martin's novel "A Storm of Swords" adapted in the episode include parts from chapters 20, 21, 27, 32, 35, 38 and 40 (Tyrion III, Catelyn III, Jon III, Jaime IV, Arya VI, Jaime V, and Arya VII).