The studio originally wanted to shoot the entire film in Salamanca, Spain, but the local government refused to close the Plaza Mayor for nearly 3 months. Production was moved to Cuernavaca and Puebla, Mexico. Only the scenes filmed from the air were shot in Spain.
The original script set the story in Madrid, but the producers wanted a more "exotic" location. The fact is revealed in some scenes, like the secret service guy who says they can't locate a single person among "5 or 6 million" (Madrid's population; Salamanca's is much smaller), or when the cop enters a Muslim neighborhood during the foot chase (Madrid has one, Salamanca doesn't).
In the original script, the tourist was a Russian named Lewicki. When Forest Whitaker auditioned for a different role, Pete Travis was so impressed that he rewrote the tourist as an American and offered the role to him.
In the scene shortly after the assassination attempt, Agent Taylor says to Agent Barnes "But it happened. On our watch." to which Agent Barnes replies "I can't live with that," is a reference to the National Geographic Channel's documentary, "Inside the U.S. Secret Service", in which Agent Larry Cockell--the Agent-in-Charge of President Bill Clinton's protective detail--made a remark about the potential of assassination: "My motto is, 'It won't happen on my watch. It can't happen on my watch, because I can't live with it.'"
The trivia items below may give away important plot points.
William Hurt technically plays two different characters in the film: the President; and his double. Hurt deliberately played the two roles differently: the double is a bit stiff, with a very plastic smile; the real President is more relaxed and authentic.
One of the key themes of this film is the way that expectations influence our point-of-view. To emphasize this, some lines were filmed in two different ways, depending on whose POV is being represented, and what the audience has learned about the plot layers. In particular, several of Matthew Fox's scenes were played in two subtly different ways depending on whether we're seeing him as the good guy or we've realized he's a villain.