The critically acclaimed Showtime series Homeland received secret assistance from the Obama-era Central Intelligence Agency and its then-director John Brennan, according to a new interview with the producers of the show and network executives.

In a roundtable conversation published Thursday by the Hollywood Reporter, the team behind Homeland revealed that they met with intelligence officials at CIA headquarters in Langely, Virginia. Although they didn’t say when the meeting took place, they told the magazine that it was during the time that Brennan was running the agency.

Brennan served as CIA director from 2013 to 2017, during the Barack Obama administration.

The wide-ranging conversation touched on how Homeland was created and how the creative team was able to tap into the knowledge of CIA agents, ambassadors, ex-military personnel, journalists, and even whistleblower Edward Snowden.

At one point, the Homeland team visited Langely to meet with the real-life counterparts to the characters portrayed in the series.

“A meeting was arranged between the cast, the network and the CIA at Langley. They confiscated our cellphones, and our whole team is just sitting there across from maybe 50 CIA agents,” said Gary Levine, Showtime’s former executive vice president of original programming.

David Nevins, then-president of entertainment at Showtime, recounted how Brennan sat in for part of the meeting.

“John Brennan, who was running the CIA at the time, came out in the middle and says, ‘I don’t know what your show is, but I know it matters to my people,'” Nevins said.

The Homeland team recounted how Brennan offered actor Mandy Patinkin a special tour.

“Then he grabbed Mandy and said, ‘Hey, do you want to see your office?'” Levine recalled. In the series, Patinkin played Saul Berenson, who became acting CIA director in the third season.

Showrunner Alex Gansa revealed that the Homeland team was able to speak remotely with Edward Snowden, the NSA whistleblower. The surprise conversation came courtesy of Barton Gellman, the author of Angler: The Cheney Vice Presidency.

“He [Gellman] shows up with his laptop, sets it up, dials a number or whatever, and the next thing we know, we’re talking to Ed Snowden in Moscow,” Gansa recalled. “Very odd guy. But this is before he was doing any talking to anybody.”

The Homeland team took a few swipes at President Donald Trump during the conversation. They revealed that members of the “deep state” and media “were both really freaked out by this president.”

“One thing that we learned is that you keep American foreign policy consistent from one administration to the next,” Gansa said.

“The worst thing you can do is to backtrack, like to say no to the Climate Change Agreement or the Iran treaty. That is anathema for the intelligence community because it rocks the boat. It makes nobody trust us abroad.”

Patinkin also took aim at President Trump recently, describing his administration as a “cancer that affects the world globally.”

The eighth and final season of Homeland is set to bow on Showtime on Feb. 9.

Follow David Ng on Twitter @HeyItsDavidNg. Have a tip? Contact me at dng@breitbart.com