The Iraq war has acted as a "recruiting sergeant" for extremists, a research paper prepared for the Ministry of Defence's Defence Academy says.
The report said the Iraq war had radicalised disillusioned youth
The paper on Pakistan admitted serious failings in the war on terror, the BBC's Newsnight programme has learned.
It blamed Pakistan's ISI intelligence service for indirectly supporting terrorism and extremism.
The MoD said the academic research notes did not represent the views of the department or the government.
The paper said: "The war in Iraq...has acted as a recruiting sergeant for extremists across the Muslim world.
"Iraq has served to radicalise an already disillusioned youth and al-Qaeda has given them the will, intent, purpose and ideology to act."
On Afghanistan, the paper said the UK went in "with its eyes closed".
The report also reveals that a secret deal to extricate UK troops from Iraq so they could focus on Afghanistan failed when British military leaders were over-ruled.
It blames the ISI for "indirectly supporting terrorism and extremism, whether in London on 7/7 or in Afghanistan or Iraq".
The paper also accuses the Pakistan Army of indirectly supporting the Taleban by backing Pakistan's religious parties.
President Musharraf told Newsnight: "I totally, 200% reject it. I reject it from anybody - MoD or anyone who tells me to dismantle ISI.
"ISI is a disciplined force, breaking the back of al-Qaeda. Getting 680 people would not have been possible if our ISI was not doing an excellent job."
The author of the academic paper, based on research carried out in Pakistan less than three months ago, is understood to be linked to the Secret Intelligence Service.
He has a military background and has been involved in strategy dealing with the threats from terrorism. The BBC has chosen not to name him for security reasons.
An MoD spokesman said: "The academic research notes quoted in no way represent the views of either the MoD or the government.
"To represent it as such is deeply irresponsible and the author is furious that his notes have been wilfully misrepresented in this manner.
"Indeed, he suspects that they have been released to the BBC precisely in the hope that they would cause damage to our relations with Pakistan.
"Pakistan is a key ally in our efforts to combat international terrorism and her security forces have made considerable sacrifices in tackling al-Qaeda and the Taleban.
"We are working closely with Pakistan to tackle the root causes of terrorism and extremism."
Tony Blair has consistently denied a link between military action in Afghanistan and Iraq and Muslim radicalisation and extremism in the UK and abroad.
Newsnight, BBC Two, 2230 BST Wednesday 27 September