Danzo Shimura, one of Naruto's most despicable characters, might have been indirectly responsible for saving the protagonist.
Characters at the end of Naruto: Shippuden are significantly ... the Human Path, the Asura Path, the Preta Path, and the Naraka Path, Pain defeats and kills Jiraiya, and destroys Konoha.