The US government and Hollywood have always been close. Washington DC has long been a source of intriguing plots for filmmakers and LA has been a generous provider of glamour and glitz to the political class.

But just how dependant are these two centres of American influence? Scrutiny of previously hidden documents reveals that the answer is: very.

We can now show that the relationship between US national security and Hollywood is much deeper and more political than anyone has ever acknowledged.

It is a matter of public record that the Pentagon has had an Entertainment Liaison Office since 1948. The Central Intelligence Agency (CIA) established a similar position in 1996. Although it was known that they sometimes request script changes in exchange for advice, permission to use locations, and equipment like aircraft carriers, each appeared to have passive, and largely apolitical roles.

Files we obtained, mainly through the US Freedom of Information Act, show that between 1911 and 2017, more than 800 feature films received support from the US government’s Department of Defence (DoD), a significantly higher figure than previous estimates indicate. These included blockbuster franchises like Transformers, Iron Man, and The Terminator.

On television, we found over 1,100 titles received Pentagon backing – 900 of them since 2005, from Flight 93 to Ice Road Truckers to Army Wives.

When we include individual episodes for long running shows like 24, Homeland, and NCIS, as well as the influence of other major organisations like the FBI and White House, we can establish unequivocally for the first time that the national security state has supported thousands of hours of entertainment.

For its part, the CIA has assisted in 60 film and television shows since its formation in 1947. This is a much lower figure than the DoD’s but its role has nonetheless been significant.

The CIA put considerable effort into dissuading representations of its very existence throughout the 1940s and 1950s. This meant it was entirely absent from cinematic and televisual culture until a fleeting image of a partially obscured plaque in Alfred Hitchcock’s North By Northwest in 1959, as historian Simon Willmetts revealed last year.

The CIA soon endured an erosion of public support, while Hollywood cast the agency as villain in paranoid pictures like Three Days of the Condor and The Parallax View in the 1970s and into the 1980s.

When the CIA established an entertainment liaison office in 1996, it made up for lost time, most emphatically on the Al Pacino film The Recruit and the Osama bin Laden assassination movie Zero Dark Thirty. Leaked private memos published by our colleague Tricia Jenkins in 2016, and other memos published in 2013 by the mainstream media, indicate that each of these productions were heavily influenced by government officials. Both heightened or inflated real-world threats and dampened down government malfeasance.

One of the most surprising alterations, though, we found in an unpublished interview regarding the comedy Meet the Parents. The CIA admitted that it had asked Robert De Niro’s character not possess an intimidating array of agency torture manuals.

Nor should we see the clandestine services as simply passive, naive or ineffectual during the counterculture years or its aftermath. They were still able to derail a Marlon Brando picture about the Iran-Contra scandal (in which the US illegally sold arms to Iran) by establishing a front company run by Colonel Oliver North to outbid Brando for the rights, journalist Nicholas Shou recently claimed.

The (CIA) director’s cut

The national security state has a profound, sometimes petty, impact on what Hollywood conveys politically. On Hulk, the DoD requested “pretty radical” script alterations, according to its script notes we obtained through Freedom of Information. These included disassociating the military from the gruesome laboratories that created “a monster” and changing the codename of the operation to capture the Hulk from “Ranch Hand” to “Angry Man”. Ranch Hand had been the name of a real chemical warfare programme during the Vietnam war.

In making the alien movie Contact, the Pentagon “negotiated civilianisation of almost all military parts”, according to the database we acquired. It removed a scene in the original script where the military worries that an alien civilisation will destroy Earth with a “doomsday machine”, a view dismissed by Jodie Foster’s character as “paranoia right out of the Cold War”.

The role of the national security state in shaping screen entertainment has been underestimated and its examination long concentrated in remarkably few hands. The trickle of recent books have pushed back but only fractionally and tentatively. An earlier breakthrough occurred at the turn of the century when historians identified successful attempts in the 1950s by a senior individual at the Paramount film studio to promote narratives favourable to a CIA contact known only as “Owen”.

The new FOI documents give a much better sense of the sheer scale of state activities in the entertainment industry, which we present alongside dozens of fresh cases studies. But we still do not know the specific impact of the government on a substantial portion of films and shows. The American Navy’s Marine Corps alone admitted to us that there are 90 boxes of relevant material in its archive. The government has seemed especially careful to avoid writing down details of actual changes made to scripts in the 21st century.

State officials have described Washington DC and Hollywood as being “sprung from the same DNA” and the capital as being “Hollywood for ugly people”. That ugly DNA has embedded far and wide. It seems the two cities on opposite sides of the United States are closer than we ever thought.