IT'S been a mystery worthy of a Hollywood thriller.

Where did the makers of movie Zero Dark Thirty get detailed intelligence about the raid that killed terror chief Osama bin Laden?

After much claim and counterclaim in the corridors of power in the US, the whodunit now appears to have been solved once and for all.

Documents released by the CIA under a Freedom of Information request show former US intelligence chief Leon Panetta accidentally offered up top secret information about the mission during a speech he gave at an awards ceremony in June 2011.

Scriptwriter Mark Boal just happened to be in the audience.

Mr Panetta, who also served as Defence Secretary, explained he was unaware Mr Boal was in attendance and assumed everyone in the room had the proper clearance to be there.

The entire speech was classified "top secret".

During the address, Mr Panetta "specifically recognised the unit that conducted the raid and identified the ground commander by name."

Some of this information had already been revealed in a draft Pentagon inspector general's report that leaked earlier this year.

At the end of the speech Mr Panetta concluded: "You have made me proud of the CIA family. And you have made me proud as an Italian to know that bin Laden sleeps with the fishes."

The FOI request by political watchdog group Judicial Watch delivered a range of internal CIA documents that shed light on the issue.

A statement from Mr Panetta reads: "I had no idea that individual was in the audience. To this day, I wouldn't know him if he walked into the room.''

It has long been claimed that officials at the CIA gave classified information to director Katherine Bigelow and Mr Boal after they requested it.

READ: FAMILY OUTRAGED AT ZERO DARK THIRTY

However, Mr Boal insisted he never asked for any documents.

The film also made headlines for its heavy depiction of torture on screen.

Many US lawmakers were upset by the suggestion enhanced interrogation techniques were used to extract pertinent information from enemy combatants.

The government officials insisted the important intelligence which led to Bin Laden's death was not obtained through torture.

Zero Dark Thirty, which starred Jessica Chastain and Jason Clarke, chronicles the story of the years leading up to the mission which led to the attack on Bin Laden's Pakistan compound - and the terrorist mastermind's death in 2011.

Mr Panetta worked as CIA director from 2009 to mid-2011 and then as defence secretary until stepping down in February this year.

-with wires