Nagato is one of the fan favourite character whose story resonate alot with Naruto Uzumaki.
He was the leader of the Akatsuki and the one who killed the legendary sannin Jiraiya.
But if the things had been a little different in his life he could have been the main protagonist in the narutoverse.
He was trained by Jiraiya in his childhood along with Yahiko and Konan and just like Naruto was assumed to be the child of prophesy.
Life of Nagato Uzumaki
Nagato was the son of Fuso and Ise. It is not known if both of his parents were from the Uzumaki clan but he was born into the Uzumaki clan who had immense chakra reserves.
He belonged to the hidden rain village. When he was about 10 years old one night some shinobi sneaked into there house in search of food and safety assuming it to be empty.
Fearing them his father tried to sneak Nagaro and his mother out of the house but was found out.
The shinobi assumed them to be enemy killed his parents but when they came to know they were civilian they apologised to Nagato.
But out of anger he had used the rinnegan which was planted in his body by Madara Uchiha about which neither he nor his parents knew.
After that having no one left in his family he roamed hopelessly in the amagakure where he fell down from hunger on the brink of death.
There he meet Konan and Yahiko who were also orphan from the war just like him who gave Nagato some food which they had to eat.
From there their friendship started. Nagato was very much inspired from Yahiko who talked about peace and love.
Yahiko came to knew that the three legendary sannin were in there village to hunt down Hanzo.
So he decided along with Konan and Nagato to learn ninjutsu from them and among the sannin Jiraiya decided to teach them to make them able to survive in the war.
During teaching the three kids Jiraiya noticed the rinnegan of Nagato and he knew that he could be the child of the prophecy.
After training them Jiraiya left and the kids formed the akatsuki a group of ninja who were working against Hanzo to bring peace to Hidden rain.
In one of there face off Yahiko had sacrificed himself to save Nagato and Konan.
Seeing that Nagato came to understand that to bring peace he had to use power and influence and it could not be achieved without giving pain to others.
He turned the deceased body of Yamato to turn it into a controlled puppet which he used for his rinnegan Deva path.
Other than him he used some more deceased for the other 6 path.
Later on Obito who was acting as Madara made Nagato to change his mind and planned to capturing the tailed beasts first.
From there he became the leader of akatsuki which took in rogue ninja from all countries.
And later on when his news reach the ears of Jiraiya he came to the hidden rain village and fought him but died in coming to know his real identity.
After that Nagato Or pain attacked the konoha village to capture the nine tails there he fought with Naruto, killed many villagers including Hinata and Kakashi, completely destroyed Konoha.
But by the end of fight between Nagato and Naruto he came to understand the ninja way of Naruto and had a change of heart.
He came to understand that peace could be achieved without pain and Naruto is the one who could do it.
So in the end he used the rinne rebirth jutsu to bring the all dead villager back to life whom he had killed with his 6 path puppets.
But this jutsu took his life for bringing them back to life.
Nagato had been a major character in turning Naruto what he is today.
Kishimoto has shown as so much aspect of life that if there was no war Nagato could have turned just like Naruto.