The government was warned over a year ago by its most senior Foreign Office official that the Iraq war was fuelling UK Muslim extremism, it has emerged.
The government has denied links between the Iraq war and 7/7
Foreign Office Permanent Secretary Michael Jay issued the warning in a May 2004 letter, leaked to the Observer.
The letter to Cabinet Secretary Sir Andrew Turnbull said British foreign policy was a "key driver" behind recruitment by extremist Muslim groups.
The Foreign Office said it did not comment on leaked documents.
The letter said a "recurring theme" among the underlying causes of extremism in the Muslim community was "the issue of British foreign policy, especially in the context of the middle east peace process and Iraq".
It added: "British foreign policy and the perception of its negative effect on Muslims globally plays a significant role in creating a feeling of anger and impotence among especially the younger generation of British Muslims."
Shadow foreign secretary Liam Fox told BBC News the government's handling of the problem had been "inept from start to finish".
"What I find suprising is that the government denies there is any link when most people, with common sense, would say there is some link that makes it easier to recruit extremists from the Muslim community," he said.
Liberal Democrat foreign affairs spokesman Menzies Campbell said: "It may well be that there wasn't very much the government could do.
"But I think it's an indication of the fact that the reasons for the terrible events of 7 July, and the apparent attempt to recreate these events on the 21 July, are very complex indeed and it's not simply a question of competing ideologies as the prime minister would argue."