X-Men: The Last Stand (also marketed as X3) is a 2006 superhero film based on the X-Men superhero team introduced in Marvel Comics. It is the sequel to 2003’s X2, as well as the third installment in the X-Men film series, and was directed by Brett Ratner and written by Simon Kinberg and Zak Penn. It features an ensemble cast including Hugh Jackman, Halle Berry, Ian McKellen, Famke Janssen, Anna Paquin, Kelsey Grammer, James Marsden, Rebecca Romijn, Shawn Ashmore, Aaron Stanford, Vinnie Jones, and Patrick Stewart. The film’s script is loosely based on two X-Men comic book story arcs: “The Dark Phoenix Saga” by writer Chris Claremont and artist John Byrne, and “Gifted” by writer Joss Whedon and artist John Cassaday, with a plot that revolves around a “mutant cure” that causes serious repercussions among mutants and humans, and on the resurrection of Jean Grey.
Bryan Singer, who had directed the two previous films, X-Men (2000) and X2, decided to leave the sequel to work on Superman Returns. X2 composer John Ottman and X2 writers Dan Harris and Michael Dougherty also left to work on Superman Returns, as did James Marsden, who had very limited screen time in The Last Stand before his character was killed off due to his departure from the film. Singer had not even defined the storyline for a third film. Matthew Vaughn, who was initially hired as the new director, left due to personal and professional issues, and was replaced with Ratner. Filming took place from August 2005 to January 2006 with a budget of $210 million, and was consequently the most expensive film made at the time of its release. It had extensive visual effects created by 11 different companies.
X-Men: The Last Stand was released on May 26, 2006, by 20th Century Fox. It grossed approximately $459 million worldwide, becoming the seventh-highest-grossing film of 2006; it was at the time the highest-grossing film in the series and currently the fourth-highest-grossing film of the franchise. Critical reception was mixed, with the acting, musical score and the action scenes receiving positive notice, and criticism directed at the screenplay, overuse of characters, style and lack of dynamics.