Live Free or Die Hard (released as Die Hard 4.0 outside North America) is a 2007 American action thriller film directed by Len Wiseman. It is the sequel to Die Hard with a Vengeance (1995) and the fourth installment in the Die Hard film series. It is based on the 1997 article "A Farewell to Arms" written for Wired magazine by John Carlin. The film's name references New Hampshire's state motto, "Live Free or Die".

In the film, NYPD Detective John McClane (Bruce Willis) attempts to stop a cyber-terrorist, Thomas Gabriel (Timothy Olyphant) who hacks into government and commercial computers across the United States with the goal of starting a "fire sale" cyber attack that would disable key elements of the nation's infrastructure. Justin Long, Cliff Curtis, Maggie Q, Mary Elizabeth Winstead and Kevin Smith also star.

Live Free or Die Hard was released in the United States on June 27, 2007 by 20th Century Fox. The film grossed $383 million worldwide, making it the highest-grossing installment in the Die Hard series. It received positive reviews from critics. It is the only Die Hard film to be theatrically released with a PG-13 rating from the MPAA, although an unrated edition would later be made available on home media. A fifth film, A Good Day to Die Hard, was released in 2013.

Plot In response to a brief blackout at the FBI Cyber Division headquarters, FBI Deputy Director Miguel Bowman asks local law enforcement to bring in high-level computer hackers nationwide. NYPD Police Detective John McClane is assigned to pick up hacker Matt Farrell in New Jersey. After McClane arrives at Farrell's residence, assassins sent by Thomas Gabriel, a hacker and leader of cyberterrorists, attack them. McClane and Farrell manage to escape.

As McClane and Farrell travel to Washington D.C., Farrell tells McClane he had written an algorithm for Mai Linh (Gabriel's girlfriend and co-conspirator) to crack a specific security system; he believed his work was being used for white hat purposes. Meanwhile, Gabriel orders his crew of hackers to take over transportation grids and the stock market while nationally broadcasting a threatening message to the U.S. government. Farrell realizes this is a "fire sale", a cyber attack designed to disable the nation's infrastructure. As McClane and Farrell are driven to DHS headquarters, Linh—posing as a dispatcher—reroutes them into a helicopter ambush. McClane fends off the attackers and destroys the helicopter.

McClane asks Farrell what he thinks Gabriel's next move will be. Farrell deduces that Gabriel's next target will be the power grid. The two drive to a utility superstation in West Virginia and find it under the control of a team led by Linh. McClane and Farrell kill Linh's team. After a struggle, Linh and McClane end up in a vehicle that is stuck in an elevator shaft. McClane climbs out of the vehicle and escapes, but the vehicle falls to the bottom of the elevator shaft and explodes, killing Linh.

Farrell traces Gabriel and uploads his picture to Bowman, who learns that Gabriel has orchestrated the fire sale. McClane learns from Bowman that Gabriel once worked for the DOD as chief programmer. Gabriel warned the department about weaknesses that made America's network infrastructure vulnerable to cyberwarfare, but he was ignored and later fired for his unorthodox methods, so he is seeking revenge. Enraged over Linh's death, Gabriel redirects natural gas to the superstation and causes an explosion in another attempt to kill McClane and Farrell. The two barely escape, but the destruction of the facility causes a massive blackout throughout the Eastern Seaboard.

McClane and Farrell travel by helicopter to the home of super hacker Frederick "Warlock" Kaludis in Baltimore. Warlock identifies the piece of code Farrell wrote for Linh as a means to access data at a Social Security Administration building at Woodlawn, Maryland. Doing a traceroute, Warlock locates Gabriel; he is at Woodlawn. McClane, Farrell, and Bowman discover that Woodlawn is actually an NSA facility intended to back up the nation's personal and financial records as a failsafe in the event of a cyber attack; it was designed by Gabriel himself. The blackout on the FBI was intended to trigger the download of the financial data to Woodlawn, and Gabriel plans to steal the data. Meanwhile, Gabriel orchestrates the kidnapping of McClane's estranged daughter, Lucy as a bargaining chip to threaten McClane.

McClane and Farrell race to Woodlawn. The two are separated during the infiltration; Farrell finds the facility's main server and encrypts the data Gabriel's men downloaded before getting captured; and McClane kills more of Gabriel's men. Gabriel flees the building, taking Farrell and Lucy with him. McClane pursues them, hijacking their semi mobile base. Accessing the communication system of an F-35B Lightning II, Gabriel orders the pilot to attack the truck McClane is driving, but the jet is destroyed by falling debris. McClane survives the attack and sees Gabriel's vehicle pull into a nearby hangar.

At the hangar, Gabriel demands that Farrell decrypt the financial data from Woodlawn. When he refuses, Gabriel shoots him in the leg and threatens to kill Lucy. McClane arrives and kills two more of Gabriel's men, but is shot and wounded by Gabriel's last man, Emerson. Gabriel positions himself behind McClane, putting the barrel of the gun in his shoulder wound. McClane then pulls the trigger. The bullet travels through McClane's shoulder and hits Gabriel in the heart, killing him instantly. Farrell then grabs a pistol and kills Emerson as the FBI arrives. Afterward, McClane thanks Farrell for saving Lucy's life.

Cast Bruce Willis as John McClane. He becomes involved in stopping Thomas Gabriel after being tasked with transporting Matt Farrell to the FBI for questioning. He saves Farrell from a hit squad and the two work together to stop Gabriel's plan. Justin Long as Matthew "Matt" Farrell, a hacker-turned-white hat who now designs cyber-security algorithms. He unknowingly helped Thomas Gabriel with his plan and survives an assassination attempt with McClane's help. He uses his computer expertise to help McClane stop Gabriel's plan. Timothy Olyphant as Thomas Gabriel, a crazed former U.S. Department of Defense analyst who leads a group of cyber-terrorists systematically shutting down the entire U.S. infrastructure. Olyphant filmed his role within three weeks. Mary Elizabeth Winstead as Lucy Gennero-McClane, McClane's estranged daughter. The inclusion of McClane's daughter was previously considered for the third film, and she was in the video game Die Hard: Vendetta. Maggie Q as Mai Linh, Gabriel's second-in-command and lover. She is an expert in both computers and martial arts. Kevin Smith as Frederick "Warlock" Kaludis, a hacker who reluctantly helps McClane and Farrell track down Gabriel. Smith made uncredited rewrites to the scenes in which he appears. Cliff Curtis as Miguel Bowman, deputy director of the FBI Cyber Security Division. Jonathan Sadowski as Trey, Gabriel's main hacker Željko Ivanek as Special Agent Molina, Assistant Deputy Director of the FBI Cyber Security Division. Christina Chang as Taylor, an FBI Cyber Security Division analyst. Additional characters include Gabriel's henchmen: Edoardo Costa as Emerson, Cyril Raffaelli as Rand, Yorgo Constantine as Russo, Chris Palmero as Del, Andrew Friedman as Casper and Bryon Weiss as Robinson.

Other actors include Chris Ellis as Lt. Jack Sclavino, McClane's superior; Sung Kang as Raj, an FBI desk officer; Matt O'Leary as Clay Wheeler, an ill-fated hacker; Jake McDorman as Jim, Lucy's boyfriend; Tim Russ as DHS agent Chuck Summer, Joe Gerety as NSA agent Jack Parry, Yancey Arias as FBI agent Johnson, and Rosemary Knower as Mrs. Kaludis, Frederick's mother. Director Len Wiseman makes a cameo appearance as an F-35B pilot, and as the voice of a Camden, New Jersey police captain. Future director of the John Wick franchise Chad Stahelski acted as a stunt performer.

Production

Unproduced Die Hard 4: Tears of the Sun sequel

After the success of Die Hard with a Vengeance, 20th Century Fox began working on a fourth film. In 1997, they purchased a script entitled Tears of the Sun, written by Alan B. McElroy. The script was about a group of people who go to set up a radio relay station deep inside the Amazon jungle, but due to a severe storm, they land in a small mining town where they hire a guide. However, they are soon captured by a drug lord and his gang, who force them to work as slaves in his mine. They manage to escape and have to survive both the jungle and drug dealers who are chasing them.Starlog #242, September 1997, Page 31

At the time Fox decided to rework the story into Die Hard 4, Tears of the Sun had been in development since the early 1990s. Around 1994, it was one of several projects to which John Woo was attached as a director, but which never got made. Along with McElroy, other writers who worked on the script included Ronald Bass, Chris Gerolmo, Larry Ferguson, Robert Mark Kamen and Joel Gross. It was also at one point considered to be re-written into a new modern adaptation of Tarzan, before Fox got the script.Starlog #177, April 1992, Page 33Starlog #242, September 1997, Page 31Multiple sources:

Willis liked the Tears of the Sun title so much that he requested that one of his films, made in 2002, be re-titled Tears of the Sun (instead of Hostile Rescue or Man of War) in exchange for starring in another Die Hard film. This is why it is often mistakenly reported that Tears of the Sun was originally going to be the fourth Die Hard film.

Script and title The film's plot is based on an earlier script entitled WW3.com by David Marconi, screenwriter of the 1998 film Enemy of the State. Using John Carlin's Wired magazine article entitled "A Farewell to Arms", Marconi crafted a screenplay about a cyber-terrorist attack on the United States. The fictional attack concept is called "fire sale" in the movie, depicting a three-stage coordinated attack on a country's transportation, telecommunications, financial, and utilities infrastructure systems. After the September 11, 2001 attacks, the project was stalled, only to be resurrected several years later and rewritten into Live Free or Die Hard by Doug Richardson and eventually by Mark Bomback.

Willis said in 2005 that the film would be called Die Hard 4.0, as it revolves around computers and cyber-terrorism. IGN later reported the film was to be called Die Hard: Reset instead. 20th Century Fox later announced the title as Live Free or Die Hard and set a release date of June 29, 2007 with filming to begin in September 2006. The title is based on New Hampshire's state motto, "Live Free or Die", which is attributed to a quote from General John Stark. International trailers use the Die Hard 4.0 title, as the film was released outside North America with that title. Early into the film's DVD commentary, both Wiseman and Willis note a preference for the title Die Hard 4.0.

Visual effects For the visual effects used throughout the film, actor Bruce Willis and director Len Wiseman stated that they wanted to use a limited amount of computer-generated imagery (CGI). One VFX producer said that "Len was insisting on the fact that, because we've got Transformers and other big CGI movies coming out, this one has to feel more real. It has to be embedded in some kind of practical reality in order to give it that edge of being a Die Hard." Companies such as Rhythm & Hues Studios (R&H), The Orphanage, R!ot, Pixel Magic, and Amalgamated Pixels assisted in the film's visual effects.