Ultron plans to have the labs in Korea build him a bio-organic body. While slowly uploading his consciousness to the new body, Wanda is able to access his mind and finds that he does plan to destroy the population of Earth so that he can repopulate it with machines that all bear his programming. The Avengers interrupt his plans and hijack the body in the cradle before Ultron can upload his entire consciousness to it.
Wanda and Pietro change sides. Meanwhile, Thor is taken by Dr. Selvig to a pool known as "The Water of Sight," where he has a vision of the new creation saving mankind.
Tony and Bruce discover that JARVIS had been laying dormant in an underground facility that Tony was able to access. The Avengers, fearing another Ultron nightmare, attempt to stop Tony, but Thor appears and uses Mjolnir to overload the body with power, and the Vision is born. Brilliantly intelligent, it is so level-minded that it can hold and carry Mjolnir.
Ultron plans to use the vibranium to lift the city of Sokovia above Earth and cause it to crash, creating a destructive shockwave similar to that of the meteor believe to have wiped out the dinosaurs. The Avengers, with help now from Wanda, Pietro, the Vision and War Machine, make their move as Ultron lifts the city. Vision confronts Ultron in one final attempt to get him to see what he will cause, but Ultron is too fargone, so the Vision corrupts his ability to travel the internet to upload into new bodies. S.H.I.E.L.D. shows up in a new flying hangar to help evacuate the city so that Tony can level it without hurting anyone.
While saving the people from Ultron's legion, Pietro is killed. Feeling his pain, Wanda destroys Ultron's main CPU, but his consciousness still exists in his legion.
With everyone safely off the flying island, Tony and Thor overload the vibranium reactor, causing the island to vaporize. War Machine destroys all but one of the escaping droids, which lands in a forest for one last talk with the Vision, who destroys the last remnant of Ultron.
Hulk flies away in a stealth Quinjet without transforming back into Bruce.
The gem in Loki's staff contained the Mind Stone, one of the 6 Infinity Stones. It now resides in the Vision, with the Tesseract in Asgard, the Aether with the Collector on Knowhere, and the Power Stone with Nova on Xandar.
With Tony announcing his resignation, the Hulk MIA, Hawkeye home with a new baby, and Thor returning to Asgard, Captain America and Black Widow break in the new Avengers: the Vision, Wanda, Falcon, and War Machine.
MID CREDIT SCENE: Thanos removes the Infinity Gauntlet from its storage cell, proclaiming, "I guess I'll just have to handle this MYSELF "