"The Tale of Jiraiya the Gallant" (自来也豪傑物語, Jiraiya Gōketsu Monogatari) is episode 133 of the Naruto: Shippūden anime.
Jiraiya notices that one of the Paths looks just like Yahiko, and wonders if Pain is Yahiko or Nagato and why there are six Rinnegan wielders; Pain, however, merely states that they are the Six Paths of Pain and attempt to finish off Jiraiya. Using his Barrier: Toad Gourd Prison technique, Jiraiya is able to trap the Animal Path and strike it with his Rasengan, knocking it into gastric acid. Before the Path dies, it manages to stab Jiraiya through the arm and chest. As the Path's forehead protector falls off, Jiraiya notices a scar and realises it is a man he fought once before. Wanting to discover more about Pain, Jiraiya attempts to dismiss the Two Great Sage Toads, telling them to take the Animal Path's corpse to Tsunade. Not wanting to leave him alone, Shima agrees to do it alone while Fukasaku stays with Jiraiya.
As Jiraiya reaches the surface, he takes a good look at all of the Paths' faces and recognises that he has met every single one of them before. He deduces Pain's identity, but before he can tell Fukasaku, one of the Paths crushes his throat and the six Paths proceed to impale him through the back. With his throat crushed and his heart beginning to fail, Jiraiya comes to the realisation that he is dying. He recalls his life, including being rejected by Tsunade, and how is not dying a glorious death like the Third and Fourth Hokages. In his last moments, he reminisces fondly on memories of Minato and his wife Kushina and how they had asked Jiraiya to be Naruto's godfather and if they could name Naruto after the protagonist of Jiraiya's novel as Minato liked the character, who never gave up. Remembering that Naruto never gave up as it was his ninja way, Jiraiya states that as his master, he cannot give up either. Managing to stay alive with his sheer force of will, Jiraiya uses his Finger Carving Seal to write a coded message about Pain's true identity on Fukasaku's back. The Six Paths of Pain attack the duo, but Fukasaku escapes as Jiraiya drowns. As he passes away, he remarks that Naruto is the true Child of the Prophecy and how the sequel to his novel would be titled "The Tale of Naruto Uzumaki".
In Konoha, Tsunade sits on a ledge watching a river, noticing a frog. Naruto, who is running through the woods, suddenly stops when he feels Jiraiya's arm on his shoulder, unaware that a light is shining on him from up above.