"Nine-Tails, Captured!" (九尾捕獲完了, Kyūbi Hokaku Kanryō) is episode 165 of the Naruto: Shippūden anime.
Fukasaku and Shima begin to prepare their genjutsu so that Naruto may be able to exploit Pain's five-second intervals. The Deva Path then uses its Banshō Ten'in to pull Naruto towards it as the Preta Path restrains him. Naruto's Sage Mode deactivates as the Preta Path begins to absorb his chakra. Realising that not being able to move is a good thing, Naruto takes the opportunity to stand still and gather natural energy, which the Preta Path acquires. However, the Path consumes too much and turns into a frog statue, effectively being destroyed.
Irritated yet surprised that he has been pushed this far, the Deva Path uses Banshō Ten'in to pull in Fukasaku and kills him; Naruto, trying to catch the toad, falls to the ground as Pain stabs his hands with his black pole, pinning Naruto. Having trapped the jinchūriki, Pain tells him that the world shall finally know true pain, after which peace shall be created. Naruto calls Pain a hypocrite for preaching about peace after killing Jiraiya and Kakashi while also destroying Konohagakure. Pain explains that he and Naruto are fighting for the very same peace that Jiraiya wanted, and that he is merely having his vengeance on Konoha for what they did to Amegakure during the Second Shinobi World War, in which Ame was treated as a battleground by the Lands of Fire, Wind and Water. Pain states that he lost his family and friends due to the shinobi cycle of hatred and thus understands the pain Naruto must be feeling, and asks Naruto what approach he would take to ensure peace. Naruto recalls Jiraiya bestowing to him his wish to break the cycle of hatred and bring about peace, and responds that he does not have an answer.
Pain divulges that by acquiring the Nine-Tailed Fox, he would soon have the power of all nine tailed beasts, after which he would be able to use their power to destroy entire nations. After such destruction, the world would be frightened and inspired by that very fear to not cause wars and thus peace would be stabilised. As the years pass, eventually the fear would dissipate, after which humans would no doubt use the tailed beasts against one another, once again causing massive destruction that would spur fear and quell conflict.
Meanwhile, Shikamaru decides that they should find the real Pain as to not let Shizune's death to have been in vain, claiming that they will glean whatever they can from everyone, including dead bodies. Inoichi recalls the memory he had glimpsed inside Yūdachi's mind and remembers that Pain lives in a high tower. Realising that the real Pain must be nearby and in the highest tower near Konoha in order to control the Six Paths of Pain, they decide to locate him. In his tower, a crippled and ill Nagato is revealed to be the true "Pain", speaking to Naruto via his Deva Path. Konan notices Nagato coughing blood and tells him that he ought to take it easy, as he has already depleted a lot of chakra.