Prior to filming, Armando Iannucci gained access to the US Department of State by flashing a simple photo ID to a security guard and saying "BBC. I'm here for the 12:30." He then spent a few hours walking around taking pictures for his set designers. The meeting in which General Miller is stood up by Linton Barwick was also scheduled for 12:30.
Many scenes set at 10 Downing Street (the Prime Minister of the United Kingdoms's office) were actually filmed at the real 10 Downing Street. The production gained access to the location largely because the staff were extremely excited to meet the actors who were playing their fictional counterparts.
Armando Iannucci is well known for asking his actors to improvise their scenes around the script, and edits out the best for later. In one such improvised scene, James Gandolfini became angry enough to make Peter Capaldi drop out of character (he thought Gandolfini would "physically pummel me") and he asked the writers to script him a better come back.
Despite being based on Armando Iannucci's TV show The Thick of It (2005), and sharing the hand-held camera movements and pervasive bad language of it, only three of the characters in the film are the same as in the TV show: Malcolm Tucker, Jamie McDonald, and Sam, Malcolm's PA.
The character of Jamie MacDonald is the result of what writer/director Armando Iannucci calls "Frasier logic". When the producers of the sitcom 'Frasier', created Frasier Crane's brother Niles, they wanted the character to be "Frasier, but more so". So Jamie MacDonald, a foul-mouthed Scot, is "Malcolm Tucker, but more so".
Armando Iannucci, in an interview with Terry Gross on 27 July 2009, said that he at one point told his British cast members to think of "the first time you went to Hollywood", for the scenes that follow the Prime Minister's trip to Washington: "(Y)ou had all sorts of meetings, and all sorts of agents came up to you and said how great you were, and how you thought it was all going to change, and then after your stay in Hollywood for three or four days, you went home empty-handed". He described this as the experience he had when going to Los Angeles a few years before to talk about possibilities for an American version of his show The Thick of It (2005).
Keira Knightley is cited by the Minister for International Development Simon Foster as a good choice for a companion on a deserted island. Simon Foster is played by Tom Hollander, who worked with Knightley in Pride and Prejudice and the Pirates of Caribbean saga.