A newly released trove of documents recovered from Osama bin Laden’s Pakistan compound have revealed “secret dealings” between Iran and al-Qaeda.

Nearly half a million files found on the computer seized in the May 2, 2011, US raid on the al-Qaeda founder's hideout in Abbottabad were released by the CIA on Wednesday.

A never-before-seen 19-page document purportedly written by a senior member of al-Qaeda details an arrangement between Iran and members of the group to strike American interests in "Saudi Arabia and the Gulf."

In exchange, Shia Iran offered Sunni militants "money, arms” and “training in Hizbollah camps in Lebanon."

Iranian intelligence facilitated the travel of some operatives with visas, while sheltering others.

The author of the file, described as "well-connected," explains that al-Qaeda's forces violated the terms of the agreement of the deal, however, resulting in several men being detained.

Secretary of State Hillary Rodham Clinton, President Barack Obama and Vice President Joe Biden, along with with members of the national security team, receive an update on the mission against Osama bin Laden in the Situation Room of the White House credit: AP

Iranian connections to Hizballah and Palestinian militant groups, such as Hamas and Palestinian Islamic Jihad, are well-documented, but its ties to al-Qaeda have until now mostly been shrouded in secrecy.

The timing of the release comes as US President Donald Trump is trying to decertify a bilateral deal agreed with Iran to end its nuclear proliferation programme, which was negotiated by his predecessor Barack Obama and one which he has described as the “worst deal ever made”.

Mr Trump has been keen to portray Tehran as America’s greatest threat and will no doubt seize upon the documents as proof of the Islamic republic’s support for terrorism in the region.

Speaking at a national security seminar organised by the Foundation for the Defense of Democracies in Washington DC last month about the release of the documents, Mike Pompeo, CIA director, said al-Qaeda and Iran have always built "secret and open" ties.

Central Intelligence Agency Director Mike Pompeo arrives for a closed briefing before the House Intelligence Committee on Capitol Hill in Washington, D.C., U.S. credit: Reuters

Mr Pompeo attributed the relationship between the two parties to the fact that they view the West as a common enemy, referring to an "ideological consensus" of their cooperation against the West.

He added that the two sides did not fight against each other because they considered the West a greater threat to them.

Mr Pompeo stressed that CIA is still watching these relations, especially with the complexity of the situation in Syria, noting that US intelligence is tracking the terrorist organisations' loss of territories in Syria and Iraq.

His comments have raised alarm bells among critics of Mr Trump's new strategy to counter Iranian influence, wary that hawks like Mr Pompeo may be making a case for war.

The documents also contained a log of bin Laden’s video collection, which included pornographic material, several Hollywood movies and three documentaries about himself.

Two newly-released videos also show scenes from the wedding of bin Laden’s son Hamza, the first picture of the heir apparent as an adult.

The images are not current, but they are much more recent than the photo al-Qaeda is willing to distribute.

According to Thomas Joscelyn and Bill Roggio, scholars from the foundation who were allowed to study the trove before it was made public, it provides new insights.

“The Abbottabad repository confirms that bin Laden was anything but retired when US forces knocked down his door. He was not a mere figurehead,” they write in the Long War Journal.

“During the final months of his life, Osama bin Laden was communicating with subordinates around the globe. Recovered memos discuss the various committees and lieutenants who helped bin Laden manage his sprawling empire of terror.”

With 470,000 files released in one trance, it will likely take weeks for journalists, academics, and other researchers to shift through the documents in the trove and contextualise their significance.