Development Bryan Singer, the director of the first two
20th Century Fox X-Men films, left the project in July 2004 in favor of developing
Superman Returns (2006) for
Warner Bros. Pictures. Singer stated that he "didn't fully have
X-Men 3 in my mind" in contrast to a fully formed idea for a
Superman film and interest in joining that franchise. By the time of his departure, Singer had only produced a partial
story treatment with
X2 (2003) screenwriters
Dan Harris and
Michael Dougherty, who accompanied him to
Superman Returns. The treatment focused on Jean Grey's resurrection, which would also introduce the villainess
Emma Frost, a role intended for
Sigourney Weaver. Frost was an
empath manipulating Jean's emotions in the treatment and, like the finished film, Magneto desires to control her. Overwhelmed by her powers, Jean kills herself, but Jean's spirit survives and becomes a god-like creature, which Dougherty compared to the star child in
2001: A Space Odyssey (1968). New contracts for returning cast members were made, as the actors and actresses had signed for only two films. Hugh Jackman's contract included the approval of director, initially offering the position to
Darren Aronofsky, with whom he had just finished filming on
The Fountain (2006).
Joss Whedon, whose comic book storyline "Gifted" from
Astonishing X-Men which he wrote was integrated into the script's plot, turned down the offer because he was working on a
Wonder Woman film.
Rob Bowman and
Alex Proyas were also rumored to be up for consideration, though Proyas personally turned it down, citing feuds with Fox president
Thomas Rothman while producing
I, Robot (2004).
Zack Snyder was also approached, but he was already committed to
300 (2007).
Peter Berg was also considered to direct the film, but he too turned down the job.
Guillermo del Toro was also offered to direct the film but turned down as he was already committed to ''
Pan's Labyrinth'' (2006). In February 2005, with still no director hired, Fox announced a May 5, 2006, release date, with filming to start in July 2005 in
Vancouver. One month later, the studio, signed
Matthew Vaughn to direct, and pushed the release date three weeks to May 26,
Memorial Day weekend. Vaughn cast
Kelsey Grammer as Beast,
Dania Ramirez as Callisto, and
Vinnie Jones as
Juggernaut, but family issues led him to withdraw before filming began. Vaughn was also cautious of the tight deadlines imposed by Fox, stating that he "didn't have the time to make the movie that I wanted to make". In October 2023, Vaughn stated that he left the project after a group of executives had tried to sign
Halle Berry on with a fake script, which included scenes of Storm rescuing kids from Africa.
Channing Tatum was vied for the role of
Gambit before the character was written out of the film.
Brett Ratner, who was previously considered to direct
X-Men (2000) in 1996, and
John Moore were both in the running to replace Vaughn during pre-production. On June 5, 2005, Ratner was confirmed as Vaughn's replacement. Ratner said he was surprised to get an invitation, as he thought he would have no chance to do a comic-book film after the canceled
Superman: Flyby for Warner Bros. With a limited knowledge of the
X-Men mythos, Ratner trusted his writers on doing something faithful to the comics, having the script drawing all of its scenes from the original Marvel publications. was hired as writer for
X-Men 3 in August 2004.
X2 co-writer
Zak Penn was separately working on his own draft, and the two joined forces for a combined screenplay in January 2005. Kinberg wanted the comic book arc "
The Dark Phoenix Saga" from
The Uncanny X-Men by writer
Chris Claremont and artist
John Byrne to be the emotional plot of the film, while "Gifted" by Whedon and artist
John Cassaday would serve as the political focus. The duo had seven months to complete
The Last Stands script, and during the first week of work completed the first eighty pages, consisting of the first two-thirds of the plot. This incomplete draft was leaked to
Ain't It Cool News, who proceeded to write a negative review. Vaughn later revised all of the major sequences in the film, but he did not receive a writer's credit. The writers had to fight Fox's executives to retain the Phoenix plot, as the studio only wanted the cure story, as it provided a reason for Magneto's conflict with the X-Men. Still, the disputes prevented them from adding much for Jean Grey to do in most of the film's second half, as the executives considered the tone of the Phoenix story too dark for a mainstream summer movie, and that its appeal would be limited to hardcore fans rather than a general audience. Killing Cyclops was Fox's decision, based on the availability of actor James Marsden, who was cast in Singer's
Superman Returns. The studio considered killing him off-screen with a dialogue reference, but Kinberg and Penn insisted that Jean kill him, emphasizing their relationship. Xavier's death was intended to match the impact of
Spock's demise in
Star Trek II: The Wrath of Khan (1982), as Fox felt the script called for a dramatic turning point. Kinberg and Penn were originally cautious, but grew to like the idea of killing off Xavier. They decided to write a post-credits scene suggesting the character's return for a sequel. As the studio was simultaneously developing
X-Men Origins: Wolverine (2009), limitations were set on which mutants could be used for cameo appearances in
X-Men 3 in an attempt to avoid risking character development for
Wolverine.
Gambit was considered for both the convoy scene being freed by Magneto and the Battle of Alcatraz along with the X-Men, but the writers did not want to introduce a fan favorite character and "not be able to do him justice." Kinberg reasoned, "there just wasn't enough space", and considered Gambit would only work with as much screentime as Beast. Kinberg felt that "there wasn't much left to do with the character. It also felt like he might tread a little bit on the terrain of Beast, in terms of similarities in the characters and their political standpoints in terms of dealing with their mutancy". Nightcrawler's absence was later explained in
the tie-in video game. Ratner felt too many recent action films, such as
Planet of the Apes (2001) and
X2 itself, had their ending in Washington, and the Golden Gate sequence "would be the biggest sequence in my entire career", and suggested to instead put the Worthington laboratory in Alcatraz, along with "creating a face for the cure", which became the character of Jimmy/Leech. Kinberg agreed, as he previously argued with Penn about "blowing so many things early in the movie".
Filming X-Men: The Last Stand began
shooting in August 2005 and wrapped in January 2006. Much of the film was shot at
Vancouver Film Studios, the same location of
X2. An old lumber mill next to the
Fraser River doubled as Alcatraz Island. The tight schedule made Ratner "begin
post-production the day I started shooting," sending the scenes he had just filmed to his editors. The editing team was led by Mark Helfrich, who had edited all of Ratner's films, assisted by
Mark Goldblatt in the action scenes and
Julia Wong with effects-heavy footage. According to associate producer Dave Gordon, "This is the biggest production ever filmed in Canada. It used to be
X2, now it's
X3." The film's record would be first broken by ''
Pirates of the Caribbean: Dead Man's Chest'' (2006)'s $225million budget. The original
cinematographer was
Philippe Rousselot, who eventually opted to depart the production.
Dante Spinotti, a frequent collaborator of Ratner, replaced him, with the assistance of
J. Michael Muro. Fox Filmed Entertainment co-chairmen
Thomas Rothman and
Jim Gianopulos debated whether Rogue should give Iceman a passionate kiss at the film's end or simply hold his hand. The two executives screened
The Last Stand for their daughters, as well as the studio's female marketing executives, and the hand-holding prevailed. Gianopulos stated that the kissing "was all about sex, and we didn't want that." A strong campaign of secrecy about the script was enforced by Ratner and the writers. Even the actors had problems with getting full screenplays, the
call sheets did not reveal all the characters, and many scenes were shot in varied ways. Both of the ending scenes were not included on the shooting script, with Ratner taking a small crew during one day's lunch time to film the post-credits scene with Xavier, and later going to London to film Magneto in the park. In 2014, Kinberg said of the wobbling chess piece at the end of the film, "There is a scene before the credits where Magneto's playing chess, and you see that he can just make the chess piece move, so there's a hint that he's starting to regain his powers. The leap from there was that cure from
The Last Stand didn't work exactly the way they thought it would, and so we just leaped forward however many years, and he's got his powers back." In 2017, according to co-star
Elliot Page in an interview during the
MeToo and
Time's Up movement, he accused Ratner of
homophobia, saying he outed Page as a lesbian at a cast and crew meet and greet during production, which made him feel violated. Fellow co-star and bisexual actress
Anna Paquin expressed support for Page, stating that she was present when Ratner commented.
Visual effects To make sure the visual effects were made in just one year and without exceeding the budget, visual effects supervisor John Bruno shipped the 900 visual effects shots to eleven companies in four countries – the United States, New Zealand, the United Kingdom, and Canada – and did extensive
previsualization. including a computer controlled flying rig from
Cirque Du Soleil for Angel's flight, The miniature was filmed over a period of two months in Santa Clarita, California, just outside of Los Angeles. The effects team would shoot one minute of footage outdoors each day at "
golden hour," complete with explosives, to have enough plates to composite the scene. The visual effects team had to work without reference footage due to the city of San Francisco vetting any filming on the actual bridge, including aerial shooting, as the area has restrictions on flying helicopters. Another miniature was for the Grey home, which had a destructible equivalent matching the Canadian location and also had a digital equivalent. Bruno made sure to ask the atomization made by Phoenix was not too vivid and gruesome, instead resembling
oatmeal. ==Music==