Iran has condemned the bomb attacks in London as inhumane, and offered its condolences to the victims.
Ayatollah Kashani attacked the West's war on terror
But one of the country's top clerics, Ayatollah Mohammed Emami-Kashani, said they were the direct result of the UK's support for US and Israeli policies.
The ayatollah called al-Qaeda an "illegitimate child" of the West.
The Friday prayer leader said it was divine justice that a group which had nothing to do with Islam had now conspired against its backers.
The BBC's Frances Harrison in Tehran says Iran's view is that US funding for extremist Sunni Muslim groups opposing the Soviet occupation of Afghanistan in the 1980s set the stage for the emergence of the Taleban and al-Qaeda.
A commentary on Iranian state radio, meanwhile, blamed the Israeli intelligence agency, Mossad, for the attacks.
It said Mossad was the only group capable of carrying out such operations in London and had often tried to attract attention to its opponents during G8 meetings in the past.
Ayatollah Kashani condemned the blasts, but also launched a stinging attack on Western foreign policy, punctuated with cries of "death to America, Britain and Israel".
"You talk about al-Qaeda. Have you forgotten who has bred al-Qaeda?" he asked, in remarks addressed to UK Prime Minister Tony Blair.
"It's the illegitimate child of America and Israel, but you name it Islam. This savagery is not Islam. It is coming from inside of you and it is now punching you."
'Change your ways'
He said the West had also nurtured former Iraqi leader Saddam Hussein by supplying him with weapons during the Iran-Iraq war.
"You armed Saddam with every weapon against us," he said. "But your feet are still bogged down in the Iraqi quagmires and you cannot get out."
He also attacked US George W Bush's war on terror and Middle East policies.
"Where have you reached by cracking down on terrorism? It has happened again because you do not want to use your head."
"You train terrorists and state terrorism. If you want to succeed you have to leave Palestine alone," he added.
"Acting against terrorism must be honest ... and you will not succeed unless you wise up and change your ways."