The following is an adapted excerpt from Spooked: How the CIA Manipulates the Media and Hoodwinks Hollywood by Nick Schou, published with permission from Hot Books, an imprint of Skyhorse Publishing.

Operation Tinseltown

The CIA and the rest of America’s vast shadow empire have been manipulating the press for as long as these secretive agencies have existed. But the clandestine effort to control public thought does not stop there. The CIA also makes a major effort to insert itself into our dream life.

It wasn’t until the mid-1990s that the CIA formally hired an entertainment industry liaison and began openly courting favorable treatment in films and television, but the agency has been covertly working with Hollywood since its inception in 1947. As part of its lavishly budgeted, global propaganda campaign during the Cold War, the CIA secretly funded the production of the 1951 animated feature, Animal Farm, based on George Orwell’s anti-communist parable. The CIA made sure that the animated version of Orwell’s story left out the late author’s sour sentiments about the capitalist system, focusing its critique entirely on the grim aspects of communism.

* * *

During the Clinton presidency, the CIA took its Hollywood strategy to a new level—trying to take more control of its own mythmaking. In 1996, the CIA hired one of its veteran clandestine officers, Chase Brandon, to work directly with Hollywood studios and production companies to upgrade its image. “We’ve always been portrayed erroneously as evil and Machiavellian,” Brandon later told the Guardian. “It took us a long time to support projects that portray us in the light we want to be seen in.”

The flag-waving Tom Clancy franchise became a centerpiece of CIA propaganda in the 1990s, with a succession of actors (Alec Baldwin, Harrison Ford, and finally Ben Affleck) starring in films like Patriot Games, Clear and Present Danger, and The Sum of All Fears.

The long relationship between Affleck, a prominent Hollywood liberal, and [CIA headquarters in] Langley seems particularly perplexing. But the mutual admiration has paid off handsomely for all concerned. According to the Guardian, during the production of The Sum of All Fears, the 2002 Clancy thriller starring Affleck, “the agency was happy to bring its makers to Langley for a personal tour of headquarters, and to offer [the star] access to agency analysts. When filming began, [CIA liaison] Brandon was on set to advise.”

The CIA’s man in Hollywood was also a frequent presence on the set of Alias, the TV espionage series starring Affleck’s then-wife, Jennifer Garner. The series, which debuted in September 2001, reflected the pervasive paranoia of the post-9/11 era—that climate of permanent anxiety so beloved by national security agencies.

In March 2004, the CIA announced that Garner—reflecting the growing merger between Langley and Hollywood—had filmed a recruitment video for the agency. The agency’s press release stated, “Ms. Garner was excited to participate in the video after being asked by the Office of Public Affairs. The CIA’s Film Industry Liaison worked with the writers of Alias during the first season …. Although the show Alias is fictional, the character Jennifer Garner plays embodies the integrity, patriotism, and intelligence the CIA looks for in its officers.”

Another TV show the CIA tasked Brandon to chaperone was The Agency, a CBS dramatic series showcasing American spy heroics. Weirdly, the series’ September 2001 premiere (which had been filmed before 9/11) featured a plot by Osama bin Laden against Western targets, and it had to be delayed when reality trumped the script-writers. Since in real life the agency had failed to protect America from the 9/11 attacks, Langley understandably found the subject of bin Laden too sensitive to broach that month. The episode that replaced the original premiere featuring bin Laden had its own strange backstory, rewriting one of the most notorious chapters in CIA history. In The Agency’s version, the CIA actually tries to stop an assassination plot against Fidel Castro—a plotline that the Cuban leader undoubtedly found amusing as would, for that matter, anyone else who recalled the spy outfit’s relentless campaign to knock off Fidel over the years, using everything from a bazooka to a poisoned wetsuit.

As Hollywood became increasingly embedded with Langley following 9/11, CIA employees often saw their public affairs colleagues giving various celebrities personalized tours of the headquarters. “I can’t tell you how many times this happened,” recalled former CIA officer John Kiriakou. He would bump into a parade of Hollywood types, including Harrison Ford and Ben Affleck. Why are these guys allowed to walk around a top-secret facility? he wondered, with a rising sense of irritation. “Because he’s going to be playing a CIA guy in a movie? That’s the criteria now? You just have to be a friend of the agency and you can come in and walk around? In the meantime, people who are undercover are having to walk through the halls with their hands over their faces because these people aren’t cleared. It’s insane.”

Langley’s investment in Ben Affleck, and vice versa, paid handsome dividends with the hugely popular, if factually challenged, 2012 film Argo, directed by Affleck, who also starred as CIA makeup artist Tony Mendez. Based on a 2007 Wired magazine article by Joshuah Bearman, Argo told the [sort of] true story of how the CIA rescued several American hostages in Tehran, with the help of Mendez, who set up a fake Hollywood production company and was pretending to shoot a science-fiction fantasy film in Iran. According to Richard Klein, a consultant who helps connect Hollywood studios with the CIA and other government agencies, Argo was the first movie to get permission to film inside Langley headquarters in fifteen years. When the crew arrived at the gate, they were told that nobody could bring electronics into the building.

Argo took many liberties with the truth, all of them geared to make Langley and Hollywood appear more heroic. For example, the significant role played by the Canadian embassy in helping the hostages escape was left out for storytelling purposes. And despite the film’s dramatic conclusion, there were no gun-toting Iranian Revolutionary Guardsmen racing in jeeps down the runway after a jet plane full of fleeing Americans. But the movie won over audiences with its entertaining tale of a real-life Mission Impossible-style caper, while featuring the CIA in the most glowing, heroic light. In fact, Argo—which won three Academy Awards including Best Picture, and reaped over $230 million at the box office—arguably ranks as the agency’s most successful propaganda coup in Hollywood.

“That was a grand slam,” observed former CIA officer Robert Baer, whose memoir See No Evil inspired its own cinematic tale of foreign intrigue, the critically acclaimed 2005 film Syriana, with George Clooney starring as a fictional CIA officer partly based on Baer. But, Baer added, “Argo had nothing to do with reality. Anybody involved in that operation knows that. The unit Mendez worked for is fictional. He was a makeup guy. He made the first mustache I used. They aren’t supposed to last a long time, so they don’t remember your face.” When people ask Baer what he thinks is the best film made about the CIA, he tells them to watch HBO’s The Wire. “It’s the same mindless bureaucracy and politics and ambition,” he explained. “All the other crap you run into in a police department, you run into in intelligence.”

Syriana emerged as a far more complex film than Argo, exploring the murky intersection of the oil industry, CIA intrigue, and Islamic radicalism. Although Baer didn’t write the script, he suspects the CIA “couldn’t have been too happy about the movie,” given that the agency has banned his book from its bookstore at Langley. “I take it as a badge of honor,” Baer said. “My book has turned into a recruiting tool for the CIA, to their horror, because people think they can join the agency, then just go wing it and write a book and make a movie.”

* * *

Although its main character, Carrie Mathison (Claire Danes), is a bipolar CIA officer who must take medication to keep from suffering mental breakdowns and who frequently violates all kinds of protocols—even sleeping with the targets of her investigation—the Showtime television drama Homeland has become a favorite at CIA headquarters. Equally bedazzled is US Department of Homeland Security Director Jeh Johnson, who took a break from authorizing drone strikes to dine at a trendy spot in Manhattan’s SoHo district with Danes, in a creepy publicity stunt staged by the New York Times. “Homeland Times Two,” as the newspaper headlined the story. Get it? “More people have learned about targeted lethal killing from Claire than me,” gushed fanboy Johnson.

“There is an appreciation for the show [in national security circles],” confirmed Alex Gansa, Homeland’s co-creator. “We really did not hear any criticism officially or in a back channel way about the show or the character [from the CIA].”

The original idea for Homeland came from an Israeli television series called Hatufim, or Prisoners of War, which depicted Israeli soldiers returning from years in captivity, a classic homecoming yarn as old as Homer’s The Odyssey. But over several seasons, Homeland has become a platform for Gansa to explore all the most compelling and controversial aspects of the war on terror from a reliably pro-CIA point of view. “We do not pull punches,” Gansa insisted. “We are critical of our protagonist and the goals her superiors task her with. We try in a vigorous way to show both sides and not be polemic.”

Gansa said the show has never filmed inside Langley headquarters, but he and several actors from the show were invited to spend the day there. “We sat across the desk from twenty or thirty intelligence officers.” At one point, CIA Director John Brennan made an appearance.

While visiting CIA headquarters, Mandy Patinkin, who plays the role of Mathison’s boss—Saul Berenson, chief of Middle East operations—was allowed to visit Brennan’s office. “Then a very funny thing happened,” recalled Gansa. “They separated the people who had been born in the United States and those where were not.” This group included Gansa himself, who was born in the Philippines, as well as British actor Damien Lewis, and Brazilian-American actress Morena Baccarin. “We were not allowed in that part of the building where you could see an actual undercover person. We weren’t even allowed where the gift shop was because you could possibly see into the cafeteria. We were feeling very left out.” There is a revolving door between the CIA and Hollywood regarding shows like Homeland. After two seasons, as Homeland’s focus shifted overseas and began to hew more closely to real events, Gansa offered a consulting job to former CIA deputy director John MacGaffin, whose cousin, Henry Bromell, was one of the show’s original writers and whose father, Leon, had served as a CIA officer in Cairo, Tehran, and Kuwait.

MacGaffin recalls telling his friend David Ignatius—the Washington Post columnist and spy novelist with friendly ties to the CIA from his days covering the Lebanese civil war—that he was working on the show. “I didn’t know you were doing this,” Ignatius told him. “Now I know why I like the show so much.”

It’s a cozy culture of collaboration. And while the involvement of ex-spooks like MacGaffin and his old colleagues inevitably gives the show a realistic tone and accurate sense of spycraft, this verisimilitude comes with a price. For it also bolsters an already inherently pro-agency slant to the espionage series. For example, in the show’s fifth season, which was filmed on location in Germany, a character clearly based on Edward Snowden’s journalistic partner Laura Poitras (she was even named “Laura” in the show) is portrayed as so zealously committed to the principle of freedom of information and the “hacktivist” underground that she puts Berlin at serious risk of a nerve gas attack by Islamic terrorists. And while Homeland’s CIA protagonists are portrayed as flawed, and often tormented, heroes, the bottom line is they are heroes. Their Islamic militant antagonists, on the other hand, are generally filmed in conspiratorial shadows, and are portrayed as fanatics whose souls have become twisted by years of struggle against the West. The legitimate grievances that the Muslim populations of the Middle East might have, following decades of Western imperialism, exploitation, and violence are barely touched on.

Consultants who help Hollywood producers tackle espionage stories say the dream factory usually gets the intelligence world wrong for all the right reasons—the industry is in the entertainment business, after all, and facts should never get in the way of a good story. Generally speaking, as long as movies stick to fiction, the CIA claims it doesn’t care how it is depicted. Thus, a franchise like the Mission Impossible series—the most recent installment of which, Rogue Nation, portrays the agency as a feckless bureaucracy while its shadowy subcontractor, the Impossible Mission Force, repeatedly saves the world by operating outside the law—doesn’t even register a blip on Langley’s radar screen. Generally speaking, intelligence consultants, especially former members of spy agencies, try not to attach themselves to projects that might seriously compromise the public image of their former employers. While providing technical advice for minor plot points and set decorations for favorable or neutral projects, they also seek to ensure that nothing portrayed in the film might inadvertently upset the CIA or other agencies.

“The Bourne movies they cringe about mostly because of how disconnected from reality they are,” said consultant Richard Klein.

* * *

Before Homeland, Alex Gansa worked as writer on the seventh and eighth seasons of the Fox television show 24, the series that sparked a fiery debate over the way that it justified torture as a tool to fight terrorism. It is difficult to conceive of a more blatantly manipulative TV show than 24 in the post-9/11 era, with its constant siege of ruthless enemies, countdown clock imagery, and pulse-pounding soundtrack, all serving to ratchet up the American people’s anxiety level and our willingness to accept extreme security measures in the name of public safety.

Gansa acknowledged that the behavior of the show’s main character, agent Jack Bauer (Kiefer Sutherland) of the “Counter Terrorist Unit,” was intended to be a lightning rod for controversy. “Jack tortured people and it worked, in the context of a ticking time bomb situation—and, of course in real life, that never happens. The show did come under a lot of criticism for that. What’s interesting is that because of 24, popular culture became the talking point that stirred the debate.”

But Gansa stopped short of taking any responsibility for helping create a cultural climate in which CIA extraordinary rendition, black sites, and enhanced interrogation became part of the acceptable new norm during the Bush-Cheney years. In some ways, 24—which enjoyed a long, successful run, from 2001 to 2010—segued perfectly into Homeland. Though Gansa’s Showtime series is much more dramatically complex than the Fox thriller, there is the same underlying theme that our nation’s guardians must be willing to take drastic action—even if there is collateral damage, even if innocent people suffer, even if it corrupts these security agents’ own souls. In a way, Claire Danes’ Carrie Mathison is simply a more sophisticated version of Sutherland’s Jack Bauer.

Hollywood gave Langley another propaganda gift in the growing debate over torture when the film Zero Dark Thirty was released in 2012. The film reunited director Kathryn Bigelow and screenwriter Mark Boal, the creative team behind The Hurt Locker, a gritty depiction of a US Army bomb disposal unit in Iraq which won the 2009 Academy Award for Best Picture. Bigelow and Boal tried to bring the same sense of gripping reality to their new project, which purported to tell the “story of history’s greatest manhunt for the world’s most dangerous man,” Osama bin Laden. When President Obama announced on May 1, 2011, that an elite team of US Navy SEALs had just killed bin Laden at a compound in the Pakistani city of Abbottabad, the CIA was already helping Boal with a script involving bin Laden’s escape from the Tora Bora cave complex in Afghanistan. Now that he had a concrete ending to the bin Laden tale, Boal started rewriting. He and Bigelow also began pressing CIA and Pentagon officials for as much access as possible to people involved in hunting and killing bin Laden. In other words, the makers of Zero Dark Thirty were deeply embedded in the US security world from the very beginning.

According to a report by the Defense Department’s inspector general, then-CIA Director Leon Panetta seemed to have stardust in his eyes over the prospect of a Hollywood version of the search for bin Laden. The CIA chief hoped that Al Pacino would play him in the movie. (The role went instead to Sopranos star James Gandolfini.) Panetta allowed screenwriter Boal to attend a June 2011 meeting at Langley that was closed to the press and attended by all the major players in the operation. The CIA chief also gave Boal names of people whose role in the mission was still secret, and shared other classified information with the filmmakers.

A FOIA request about the film filed by Judicial Watch, a conservative watchdog group, turned up a series of emails between the filmmakers and Langley that further demonstrated how eager the CIA was to support the project. On June 7, 2011, CIA spokesperson Marie E. Harf argued that both the agency and Pentagon should back the Boal/Bigelow film over competing projects. “I know we don’t pick favorites but it makes sense to get behind a winning horse,” she wrote. “Mark and Kathryn’s movie is going to be the first and the biggest. It’s got the most money behind it, and two Oscar winners on board.”

Several weeks later, on July 20, Boal emailed then-CIA Director of Public Affairs George Little and thanked him for “pulling for him,” which he was certain had made “all the difference.” Little’s response made no attempt to hide the agency’s pleasure. “I can’t tell you how excited we all are,” he wrote. “PS—I want you to know how good I’ve been not mentioning the premiere tickets.”

As the filmmakers wrapped up pre-production work, they sent numerous emails to Langley asking for help on even the minutest of details, including the floor plan of the Abbottabad compound. “Ok, I checked with our folks, and that floor plan matches with what we have,” a spokesperson responded. “It looks legit to us.”

That accomplished, Boal and Bigelow requested even more information about the building. “Would you mind looking into getting us some of the third-floor specs?” they asked in one email. “We will be building a full-scale replica of the house. Including the inhabitants of the animal pen!”

Records show that the CIA responded immediately with a promise to help. “Ha! Of course I don’t mind!” a spokesperson wrote. “I’ll work on that tomorrow.”

The partnership between Langley and the Zero Dark Thirty filmmakers proved so tight that national security reporters felt slighted. “A lot of other people who covered the beat like I did in that search for bin Laden—we didn’t get close to that kind of cooperation from the agency on telling the inside story,” longtime Washington Post intelligence reporter Greg Miller later told PBS’s Frontline.

In the end, the CIA’s energetic cooperation with Boal and Bigelow paid off enormously, with Zero Dark Thirty serving as the most effective piece of propaganda for the agency’s torture program since 24. The film made the case that bin Laden’s capture would not have been possible without information that was extracted under torture. The filmmakers might have taken great pains to portray the smallest details of bin Laden’s compound accurately. But on this fundamental issue, they blatantly violated the truth.

After the film was released in December 2012, it came under sharp attack by Senator Dianne Feinstein, who chaired the Senate intelligence committee’s torture investigation, and Senator John McCain, himself a torture victim at the hands of the North Vietnamese. As the Senate committee determined, CIA interrogators gained no useful information by torturing their victims, either regarding bin Laden’s whereabouts or any other significant security issue. McCain’s rejection of the film’s CIA-friendly premise was particularly persuasive: “I know from personal experience that the abuse of prisoners will produce more bad than good intelligence. … Acting without conscience isn’t necessary; it isn’t even helpful in fighting this strange and long war we’re fighting.”

Feinstein, who shared McCain’s convictions about torture, was outraged by Zero Dark Thirty, walking out of a special screening arranged for her just fifteen or twenty minutes into the film. “I couldn’t handle it,” she explained. “Because it is so false.”

In September 2015, Vice reporter Jason Leopold published a story based on the CIA’s own Inspector General report, titled “Potential Ethics Violations Involving Film Producers,” which revealed even more embarrassing details about the CIA’s cozy relationship with Boal and Bigelow. As it turned out, the filmmakers had wined and dined agency officials in Hollywood and at a hotel near CIA headquarters, routinely racking up thousand-dollar restaurant bills.

Even Homeland creator Gansa and the show’s ex-CIA consultant MacGaffin were unnerved by the liberties with the truth taken by Boal and Bigelow regarding CIA torture. Gansa said the Zero Dark Thirty controversy illustrates the dangers of working with agency consultants who may have their own agendas. “I was so upset about that movie,” Gansa said. “Clearly Mark and Kathryn did research but they listened to a consultant who felt that torture clearly worked and led to the capture of Osama bin Laden. Many people would dispute that, so to represent that as the truth and put that out there to millions of people? You don’t take one person’s word as gospel and present it as factual.”

MacGaffin believes that the CIA’s efforts to hoodwink the public by spinning the Zero Dark Thirty filmmakers betray a guilty conscience about the agency’s use of torture. “I think about what decisions I would have made if I was there,” MacGaffin adds, referring specifically to the chain of command that signed off on waterboarding and other “enhanced interrogation methods” used on CIA detainees. “At the time, everyone ‘knew’ that [captured terrorists like] Abu Zubaydah absolutely ‘knew’ about other attacks. We were ‘absolutely certain.’ I think I too would have probably said, ‘We have got to [use torture].’ But I would hope after a month I would have said, ‘Why are we still doing this?’”

* * *

As the war on terror endlessly grinds on, and the surveillance state continues to insert itself into every aspect of our lives, it will be interesting to see whether Hollywood finally begins to take a more critical look at the national security complex. But, as we’ve seen, recent trends are not encouraging. With few exceptions, like Kill the Messenger (full disclosure: based on a book by me)—which was indifferently distributed and promoted—Hollywood has functioned as a propaganda factory, churning out jingoistic revenge-fantasy films, in which American audiences are allowed to exorcise their post-9/11 demons by watching the satisfying slaughter of countless onscreen jihadis. This never-ending parade of square-jawed secret agents and bearded, pumped-up commandos pitted against swarthy Muslim madmen straight out of central casting has been aided and abetted by a newly emboldened CIA all too happy to offer its “services” to Hollywood. In exchange for special guided tours at Langley and lunches with national security czars, Hollywood filmmakers have eagerly turned themselves into propagandists for perpetual war and apologists for crimes against humanity.

This has been an adapted excerpt from Spooked: How the CIA Manipulates the Media and Hoodwinks Hollywood by Nick Schou, published with permission from Hot Books, an imprint of Skyhorse Publishing.