After a battle, the three Sannin notice that they are being spotted by Ame Orphans, consisting of Yahiko, Konan and Nagato. While Orochimaru plans to kill them to put them out of their misery, Jiraiya decides to stay behind in Ame and raise the three until they are strong enough to take care of themselves. While working on his novel at their hideout, Konan rushes in to notify Jiraiya that something terrible has happened to Yahiko and Nagato. When Jiraiya arrives, he sees a dead chūnin from Iwagakure, who had been murdered by Nagato after the chūnin had attacked Yahiko. Jiraiya wonders how Nagato managed to kill a chūnin when he does not even know ninjutsu and is shocked to see that Nagato wields the Rinnegan, considered to be a mythical dōjutsu wielded by the Sage of Six Paths that has the power to both stabilise or annihilate the world. Believing that Nagato might be the Child of the Prophecy, Jiraiya trains them for the next three years.
After Yahiko, Nagato and Konan manage to defeat a Jiraiya shadow clone, Jiraiya, confident that they are able to handle themselves, leaves them and returns to Konoha, as the war is still raging. After the Sannin emerge victorious from a battle, Jiraiya is notified by a toad that three Ame orphans have died, prompting Jiraiya to reconsider whether the decisions he has made in his life were correct. Eventually, the Third Shinobi World War comes to an end due to the actions of another one of Jiraiya's pupils — Minato Namikaze. Minato reads Jiraiya's novel, The Tale of the Utterly Gutsy Shinobi, and asks Jiraiya for permission to name his unborn son after the protagonist of the story, Naruto, a name which his wife Kushina Uzumaki likes. Jiraiya is named as the godfather of the unborn Naruto and sets off on his travels once more, with a voice over by the Third Hokage proclaiming that it would be some years before Jiraiya would meet Naruto himself.