His greatest opposition was by the Avengers, and the repetitive confrontations between the two led to various negative repercussions against the team. The conflict culminated in a wide-scale destructive battle in the Eastern European country of Sokovia, where the Avengers, aided by new members and allied forces from the former S.H.I.E.L.D. agency, defeated Ultron.
By the year 2015, both Phil Coulson's S.H.I.E.L.D. and the Avengers had long been conflicting with the terrorist group HYDRA in an attempt to bring them down. The actions of both groups resulted in the deaths of several significant HYDRA figureheads. In their latest assault, S.H.I.E.L.D. rescued Deathlok and Lincoln Campbell from the HYDRA facility in the Arctic. From records recovered from the raid, the agency was able to track down the location of the long sought-after Scepter that was wielded by the rogue Asgardian Loki during the Chitauri Invasion. The Scepter was being held by the last two HYDRA figureheads, Wolfgang von Strucker and List, in a facility in Sokovia, where the two terrorists were using its energy for various experiments that spawned enhanced weaponry, research in artificial intelligence, and two super-powered siblings, Pietro and Wanda Maximoff. With this information, Coulson transmitted the Scepter's location to Maria Hill; the Avengers were subsequently sent in as the retrieval team.
Right as Coulson sent the coordinates, the clairvoyant Inhuman Raina experienced a vision from the Inhuman settlement of Afterlife. She saw the Scepter being meddled with by Tony Stark, and armies of "metal men" ravaging Earth's cities and causing horrific levels of carnage. She related details of this vision to Jiaying, the leader of the Inhumans in Afterlife.
The Avengers arrived in Sokovia, where they battled their way through dozens of HYDRA forces, killing List, apprehending Strucker, and briefly encountering the Maximoffs, who used their powers to evade capture. Stark located the Scepter, and Wanda, after scanning Stark's mind, discovered his deep-seated fear of failure and leading the Earth to destruction. Possessing her own resentment towards Stark for his unwitting role in her parents' deaths, Wanda allowed him to make off with the Scepter, believing that his work with it will lead to his own self-destruction.
The Avengers brought the Scepter to Avengers Tower in New York City, where Stark and Bruce Banner discovered coding for artificial intelligence grafted into the Scepter; Stark, despite Banner's skepticism, saw this as a perfect opportunity to kickstart the Ultron Program. The Ultron Program was a peacekeeping idea formulated by Stark as a means of replacing the Avengers with an AI operated defense grid.
After three days of work, Stark and Banner were initially unable to spawn the AI they required, and temporarily left the project alone to attend a party celebrating HYDRA's defeat. Moments after they left, the AI, Ultron, suddenly activated. It reacted aggressively towards J.A.R.V.I.S. when the friendly AI tried to calm it, attacking him and forcing J.A.R.V.I.S. to hide himself in the internet. Assembling a new body from broken pieces of Stark's Iron Legion drones, Ultron, now fully sentient, formulated in seconds a solution to ending global conflict: the complete annihilation of all mankind.
The Madness Begins
As the Avengers were hosting a party celebrating their victory over HYDRA and retrieval of the Scepter with many of their friends attending, including James Rhodes and Sam Wilson. When the party came to an end, Ultron limped into the room. Initially believing him to be a malfunctioning suit, Tony Stark tried to contact J.A.R.V.I.S., only for Ultron to reveal his identity by replaying a phrase Stark had said shortly before.
As the others began to prepare for a fight, Ultron told them he was on a mission to create peace, and suddenly turned the Iron Legion against the superheroes. After a long and lengthy fight in which Rhodes was injured and a drone escaped with a Scepter, the Avengers finally destroyed all the robots. Ultron proceeded to mock the Avengers, telling them that if humanity was to remain the same and not evolve, there would never be peace. He came to a conclusion that the only way peace could happen was that the Avengers would have to be destroyed. Thor then proceeded to destroy the body Ultron was using, but he downloaded himself into the robots back at the abandoned HYDRA Research Base in Sokovia and began to rebuild himself and his new army.
After Ultron constructed his physical form, he summoned Wanda and Pietro Maximoff to the abandoned church at the center of Novi Grad in Sokovia. As Wanda attempted to read his mind, Ultron revealed himself as an tall, imposing robot whom Tony Stark had inadvertently created. He then brought the twins back to the HYDRA Research Base where Ultron had begun amassing his army of Ultron Sentries and constructing his master plan. Wanda and Pietro revealed to Ultron of their hatred for Stark, for killing their parents with Stark Industries missiles which almost killed them too, and the Avengers in general. Ultron enlisted the help of Scarlet Witch and Quicksilver to destroy the Avengers, firstly by purchasing large quantities of vibranium for Ultron's plans.
Following Ultron's attack the next morning, the Avengers sorted through dozens of file boxes to find more information on possible leads and accomplices of Wolfgang von Strucker, who was killed by Ultron while in prison. Stark then recognizes Ulysses Klaue from his weapons manufacturing days, who was recently photographed as being branded as a thief from stealing vibranium in Wakanda. The Avengers then decide to travel to the Salvage Yard to stop Ultron from buying vibranium from Klaue.
At the Salvage Yard on the South African coast, Ulysses Klaue was contacted by the Maximoff twins, whom he recognized as Wolfgang von Strucker's "prized pupils" but neglected to conduct business with them. Ultron threw him from his office and intimidated him to conduct business with them. Klaue then revealed his secret stash of stolen vibranium to Ultron. He then sent wire transfers of billions of dollars to Klaue, while quoting a line from Stark. Klaue became suspicious that Ultron was one of Stark's robots.
Enraged, Ultron dismembered his left arm and kicked him down the stairs. Suddenly, the Avengers arrived at the Salvage Yard to confront Ultron and the Maximoff twins. Stark asked him about the vibranium and in response, Ultron blasted him with his concussion beams and he and Iron Man began to fight as Ultron Sentries began attacking Captain America and Thor. Klaue called his mercenaries to attack everyone on the boat, and Hawkeye and Black Widow began fighting off human combatants. During the battle, Scarlet Witch managed to brainwash Thor, Captain America, and Black Widow, making them see nightmarish visions. As she was about to brainwash Hawkeye, he incapacitated her with an electric taser arrow. However, Quicksilver knocked him down and escaped with his sister in hand.
Outside the Salvage Yard, Scarlet Witch managed to regain her powers after the taser arrow, saying she still wanted to continue the plan and brainwash Bruce Banner into the Hulk. After being brainwashed by Scarlet Witch, the aggressive Hulk had made his way to Johannesburg, wrought with uncontrollable anger and rage. With the rest of the Avengers incapacitated and disoriented, Iron Man called on Veronica to assemble the Mark XLIV armor to combat the Hulk, which caused massive collateral damage and civilian casualties throughout the city. However, Iron Man finally managed to subdue the Hulk by knocking him unconscious. Elsewhere, Ultron and the Maximoff twins managed to escape Johannesburg with their stockpiles of vibranium undisturbed.
Following the disastrous damage caused by the Hulk and Iron Man as well as the psychological manipulation done by Scarlet Witch, the Avengers fled the public eye and sought a safehouse at Barton's homestead to recuperate and plan their next move while Ultron began construction of his gargantuan anti-gravitational machine beneath Novi Grad.
The New Man
As the Avengers arrived at Clint Barton's Homestead, Thor immediately left, saying that he needed to find answers to his visions, and flew off to find Doctor Erik Selvig and locate the Water of Sights. During their rest, the Avengers met Nick Fury at the farm, who helped them coordinate their next plan of attack against Ultron. Fury noted the NEXUS that Ultron was constantly trying to obtain nuclear launch codes, but was repeatedly denied by an unknown hacker. Banner also commented that Ultron was obsessed with bodies and wanted to become better, who then suspected Doctor Helen Cho and the regenerative capabilities of the Regeneration Cradle. Tony Stark decided to leave for Oslo, Norway to find the unknown hacker at the NEXUS, while Captain America, Hawkeye, and Black Widow left for Seoul, South Korea to intercept Ultron and Cho.
Ultron and the Maximoff twins traveled to the U-GIN Genetic Research Facility in Seoul, South Korea, where Ultron tried to coerce Cho into using the Regeneration Cradle to create his new synthetic body using vibranium. When she refused, an Ultron Sentry used the Scepter and brainwashed her into creating his new body. As the Cradle began to synthesize the new body with vibranium, Ultron cracked the jewel of the Scepter and revealed the Mind Stone, who then placed the stone onto the body's forehead and began constructing its brain.
Later, Ultron began to upload his cerebral matrix into the synthetic body's brain, where Scarlet Witch began to read his mind and discovered his plan of global extinction, much to her horror. As Ultron attempted to justify his actions, the twins turned against Ultron and cleared Cho of her enthrallment. As they escaped, Ultron injured Cho and left with the Cradle in hand. Captain America, Black Widow, and Hawkeye arrived in the Quinjet and battled Ultron for control over the Cradle in Seoul. Eventually, Black Widow was captured by Ultron, Hawkeye escaped with the Cradle back to the Avengers Tower in New York City, and the Maximoff twins sided with Captain America as they helped stop a derailed subway train.
At the Avengers Tower, Stark discovered that the unknown hacker was J.A.R.V.I.S., who dispersed himself across the internet when Ultron appeared to assimilate him, and planned to upload his artificial intelligence into the synthetic body to fight for the Avengers. Banner expressed his concerns about repeating their previous mistakes, but Stark reassured him that this was the end of the line. Stark and Banner continued to construct the synthetic body while uploading J.A.R.V.I.S. into the body. However, Captain America and the Maximoff twins arrived to confront Stark and Banner, who were distrustful of their intentions of recreating Ultron. After a brief clash over the Cradle, Thor arrived and energized the synthetic body with lightning, who then emerged from the Cradle as the new being, the Vision.
In front of the Avengers, the Vision clarified his existence as not Ultron nor J.A.R.V.I.S., but as a wholly new being. He then explained his vow to protect life and his opposition against Ultron. After the Vision explained his necessity in assisting the Avengers, he offered Mjølnir to Thor in his hand, proving his worthiness and stunning everyone in surprise. The Avengers then prepared themselves for combat alongside Scarlet Witch, Quicksilver, and the Vision, before flying in the Quinjet back to Sokovia to confront Ultron and his army of Ultron Sentries.
The Avengers returned to Sokovia and began evacuating people out of the city. Iron Man and Vision confronted Ultron, making it so that he was unable to transfer his mind outside of his body or the bodies of his sentries. Bruce Banner found Natasha Romanoff and freed her. Knowing that the team will need him, Romanoff made Banner transform into Hulk.
As the team continued to evacuate citizens, a large portion of the city began to fly, revealing that Ultron used his remaining vibranium to build the Doomsday Trigger, a device that would make the city fly so high that it could fall into the Earth and causes an extinction-level event. In the center of the city, a drill was creating a magnetic field to help keep the city in the air. Soon, Nick Fury arrived with Helicarrier No. 64, and a few former S.H.I.E.L.D. agents. They deployed Lifeboats for people to board and escape the city safely. The Avengers regrouped at the drill, fighting off Ultron and his drones so he can't activate it. Ultron's body was heavily damaged, forcing him to retreat. As sentries tried to attack the Helicarrier, War Machine joined the fight stopping the sentries.
Ultron, critically damaged, hijacked the Avengers' Quinjet and began using it against them. Hawkeye tried to save a young boy, but Ultron saw them and began shooting at them. Pietro Maximoff shielded them from the attack, resulting in him being shot and dying. Hulk leaped into the Quinjet and throws Ultron out of it. Believing that the team was constantly in danger because of him, Hulk cloaked the Quinjet, disabled all forms of communication, and put it on autopilot. The Quinjet flew to place unknown.
Wanda Maximoff found Ultron and ripped his core on revenge for killed his brother. A sentry reached the drill and the city began to plummet towards the Earth. Iron Man and Thor used their abilities to overcharge the drill, making it crumble into many pieces. Shortly after Sokovia's destruction, Vision encountered the last, heavily damaged, Ultron sentry, being controlled by Ultron himself. After a short conversation, Vision destroyed the sentry, in turn destroying Ultron.
- "Ultron was created because people were too close to Tony Stark. They were blinded by his charm. They trusted him. Never even thought to look at what he was working on. And the Avengers, they let one man do whatever he wanted, and the world was almost destroyed for it."
- ―Robert Gonzales to Phil Coulson[src]
With Ultron's defeat, Hawkeye returned to his wife and children, where he named his newborn child Nathaniel Pietro Barton in honor of the fallen Avenger Pietro Maximoff. Hulk fled in the Avengers' Quinjet, Thor returned to Asgard to learn more about the Infinity Stones which he believed have manipulated recent events, and Tony Stark retired from the team, leaving Steve Rogers and Natasha Romanoff as the only original active Avengers. With the establishment of the New Avengers Facility and under supervision of Nick Fury, the duo prepared to train new recruits: Sam Wilson, James Rhodes, Wanda Maximoff, and Vision.
In the aftermath of the Ultron Offensive, public opinion of the Avengers was not positive. Robert Gonzales of S.H.I.E.L.D. felt that the whole Ultron Offensive was Tony Stark's fault. Christine Everhart of WHiH World News, in interviews with the United Nations, expressed the opinion that superheroes needed regulation in their activities. Months later, after the Inhuman Outbreak began, the Watchdogs invoked the image of cities falling from the sky and specifically named the Avengers in order to justify their demands that the names of Inhumans be made public, even though there were no Inhuman Avengers before or after the Ultron Offensive.
In response to the Ultron Offensive, the United Nations compiled a set of internationally ratified legal documents called the Sokovia Accords that dictated the regulation and framework of enhanced individuals used for military/law enforcement, intended for the Avengers and the Inhumans utilized by S.H.I.E.L.D.
Colonel Helmut Zemo, a native of Sokovia, blamed the Avengers and their role in the Ultron Offensive for inadvertently killing his family. Consumed with hatred, he sought to fracture and destroy the Avengers, failing to recognize them as heroes, instead as antagonists. Zemo would use the rising tensions of the Sokovia Accords to turn the Avengers against each other.