"The Era of Teacher and Students…!!" (師弟時代…!!, Shitei Jidai…!!, Viz: Back in the Day…!!) is chapter 373 of the original Naruto manga.
When Jiraiya saw the young Nagato's Rinnegan, Jiraiya decided to train him, Konan, and Yahiko so they could protect themselves and others. Having heard rumours that the Rinnegan originally belonged to the founder of the ninja world, Jiraiya also wished to teach Nagato to control his power for the world's benefit. Once he had taught them all they needed he left them on their own, later hearing they had died. Although he is glad this is not the case, Jiraiya tells Konan that what Akatsuki is doing is wrong. Pain appears and refutes the claim. Seeing Pain's Rinnegan, Jiraiya assumes that, although he looks very different, he is Nagato.