The Tale of Jiraiya the Gallant (episode)

is episode 133 of the Naruto: Shippuden anime.

Synopsis
Jiraiya manages to kill one of the Pains only to realize he's fought him before. Jiraiya then tells the frogs to go back but Fukasaku refuses. Shima goes alone so Jiraiya and Fukasaku go back out to fight Pain. Suddenly, he realizes that the Pains are all people he has met before. He figures out who Pain really is but is attacked and stabbed by all five at once. Jiraiya nearly dies yet as he is passing out he remembers how Naruto never gives up and tries to sit up. Pain realizes he is not dead and goes back to finish him off but before he does Jiraiya manages to write a coded message onto Fukasaku. Finally, Jiraiya succumbs to his injuries, falling into the water. His last thoughts are about his next book and decides to name it "The Tale of Naruto Uzumaki."