WASHINGTON — Some Republican lawmakers were outraged when federal records released last week showed that the White House, CIA and Defense Department granted high-level access last year to a pair of acclaimed filmmakers researching an action thriller about the raid that killed Osama bin Laden.

The documents tell “a damning story of extremely close, unprecedented, and potentially dangerous collaboration” between the filmmakers and the Obama administration, fumed New York Rep. Peter T. King, GOP chairman of the House Homeland Security Committee.

The Defense Department’s inspector general is investigating whether any classified information was improperly disclosed. But barring that, the episode is just the latest in an increasingly close, cooperative arrangement — spanning administrations — that gives Hollywood extraordinary access to military assets and CIA operatives. In turn, the Pentagon and CIA have exercised subtle and not-so-subtle influence on scripts and helped burnish their images on screen.

Peter Berg, who directed the recently released science fiction film"Battleship,” was allowed to use five Navy warships during production, and cast Navy Secretary Ray Mabus in a cameo role. Mabus later helped launch the film at a Washington screening for Navy brass and service members.

The Navy weighed in twice for changes, Berg said.

“At one point, we hired an actor who was a little overweight to play a sailor,” he recalled. “They said, ‘This kid could not be on a ship,’ and we changed the casting.” In another scene, a sailor got into a fistfight. “It was important to them that he be held accountable.”

Berg clearly has good relations with the Navy. He embedded for a month with Navy SEALs in western Iraq as research for an upcoming military film, “Lone Survivor.” Few journalists have gotten that access.

Filmmaker Lionel Chetwynd was granted an hour with President George W. Bush for Showtime Networks’ “DC 9/11: Time of Crisis,” a patriotic 2003 docudrama about the White House response to the Sept. 11 attacks.

The latest flap concerns more than 250 pages of CIA and Pentagon emails and other records showing how national security officials cooperated with Hollywood director Kathryn Bigelow and screenwriter Mark Boal for an election-year spy thriller expected to portray President Obama in a positive light.

Nothing in the documents — obtained under the Freedom of Information Act by Judicial Watch, which describes itself as a conservative organization — indicates that the filmmakers were given classified material.

But David Robb, author of “Operation Hollywood: How the Pentagon Shapes and Censors the Movies,” sees other dangers.

“When the CIA or the Pentagon says, ‘We’ll help you, if you play ball with us,’ that’s favoring one form of speech over another. It becomes propaganda,” he said. “The danger for filmmakers is that their product — entertainment and information — ends up being government spin.”

The military’s symbiotic relationship with movies dates to the 1920s; the Pentagon regularly traded warships, bombers and technical expertise over the decades for a chance to glamorize the military and boost recruitment.

The CIA has kept an entertainment liaison on staff only since 1996. At that point, the Cold War had ended, and the agency was fighting for its budget and its existence on Capitol Hill. The new mission was clear: to overcome the CIA’s image in popular entertainment as incompetent, evil or rife with rogue employees.

“I made that a big priority, and we did a lot more with Hollywood than ever before,” said Bill Harlow, the CIA public affairs chief from 1997 to 2004. “The reason is that the American public gets a lot more of their information about the CIA from Hollywood than it does the from the news media, and much of what they see about the agency is negative and wrong.”

These days, the CIA even posts potential story lines on its website, according to spokesman Todd Ebitz.

“On some occasions, when appropriate, we arrange visits to the agency for unclassified meetings with some of our officers,” he added. “Rarely, we have allowed filming on our premises under very tight parameters.”

In 1999, the CIA allowed producers of “In the Company of Spies” to film at CIA headquarters, a first for the agency. About 50 CIA employees joined the cast as extras, and hundreds packed a premiere at the headquarters.

In 2001, the agency allowed crews from “The Agency,” a CBS television drama, to film inside CIA headquarters. The CIA planned a red-carpet reception before the show first aired, but the party was canceled after the Sept. 11 terrorist attacks.

“These are smart people,” said Michael Frost Beckner, who wrote and produced “The Agency.” “They have their agenda in mind, and if you’re serving their agenda, they play ball with you.”

One episode in the series, which aired for two seasons, featured the CIA firing a Hellfire missile from a Predator drone at a terrorist in Pakistan, a relative rarity at the time. A few weeks later, Beckner recalled, a CIA drone strike occurred and made headlines.

“The Hellfire missile thing, they suggested that,” Beckner said. “I didn’t come up with this stuff. I think they were doing a public opinion poll by virtue of giving me some good ideas.”

In 2003, producers of “The Recruit” also worked closely with the CIA. The agency wasn’t pleased that the film showed a CIA trainee being beaten in a mock interrogation, but the DVD extras included a CIA officer explaining that the scene was fiction. And star Al Pacino plugs a cherished agency myth in the movie, saying the CIA’s failures are well-known but its successes are secret.

“The CIA has been subtly influencing motion picture content for more than 15 years,” said Tricia Jenkins, author of “The CIA in Hollywood,” the first academic appraisal of the CIA’s efforts to influence popular entertainment.

Jenkins said the CIA’s cultivation of Hollywood paid off after the Sept. 11 attacks.

“Even as the CIA was subject to incredible public criticism for failing to predict the attacks, there came a spate of TV shows and movies depicting the CIA as competent, effective and willing to share intelligence,” she said.

The bloom has worn off somewhat. In this year’s “Safe House,"starring Denzel Washington, a senior CIA officer is willing to kill his own employees to keep secret a file detailing misdeeds of the CIA and other intelligence agencies.

Such negative depictions help explain why senior spies and intelligence professionals were eager to highlight their role in helping Navy SEALs finally find and kill Bin Laden at his hide-out in Abbottabad, Pakistan, in May 2011.

To that end, Bigelow and Boal were granted significant cooperation by CIA officials and the Pentagon’s intelligence chief. A few years earlier, the Defense Department did not provide production assistance for Bigelow and Boal’s Iraq war movie,"The Hurt Locker,” which won the 2009 Academy Award for best picture.

This time, the pair were offered an interview with a Navy SEAL, the newly released documents show. The SEAL was not involved in planning the raid and the meeting never occurred, according to Lt. Col James Gregory, a Pentagon spokesman.

The pair also were taken into a room at CIA headquarters called “the vault,” where tactical planning for the Bin Laden raid had taken place. A CIA spokesman said that the term is agency jargon for any secure room, and that it was empty the day they visited.

The documents also show how the filmmakers are seeking to construct a tense narrative of the decade-long hunt that finally led toBin Laden’s death.

“Part of the challenge for us is to capture how difficult this was because there is a version of it that in hindsight, it just looks like it fell into place,” Boal told Defense officials at a meeting July 14, according to a transcript. “That is why I just wanted to ask you hypothetically about what could have happened wrong, because it makes it more dramatic when it all goes right.”

For his part, Adm. William McRaven, head of Special Operations Command, which includes the SEALs, brushed off all the fuss. At a news conference Thursday in Tampa, Fla., he downplayed the Bin Laden raid as anything special.

“There was nothing overly sensitive about this raid,” he said. “From a military standpoint, this was a standard raid and really not very sexy.”

ken.dilanian@latimes.com

rebecca.keegan@latimes.com

Keegan reported from Los Angeles. David S. Cloud in the Washington bureau contributed to this report.