Agent Coulson is killed by Loki. Barton is released from Loki's mind control and unites with the Avengers. Loki uses the Tesseract to open a portal to space, unleashing the Chitauri army on New York City. The Avengers fight the army, but they're hopelessly outnumbered. The military launches a nuclear missile at the city, which Iron Man throws into the portal, destroying the Chitauri mothership, therefore killing the soldiers. Thor takes the Tesseract and a captive Loki back to Asgard for judgment. The Avengers part ways, but Fury suggests that they will be needed again. During the credits, we discover the real mastermind behind the Chitauri: Thanos.