Baltasar Garzon, who investigates "terrorism linked to Islamic fundamenatlism", told El Periodico that although Iran's al-Qaida cell did not necessarily issue orders, it did coordinate operations.
He said: "Currently there is coordination, a series of objectives clearly established (by al-Qaida), but there is no need for an order for an act to be executed ... It's diffused terrorism."
Garzon issued an international arrest warrant last September for Usama bin Ladin in the framework of an inquiry into a Spanish al-Qaida cell.
He also hit the headlines in Spain this week as the presiding judge in the case against a Spanish al-Qaida suspect, extradited from the US prison at the Guantanamo naval base in Cuba.
"Currently there is coordination, a series of objectives clearly established (by al-Qaida), but there is no need for an order for an act to be executed ... It's diffused terrorism"
Judge Baltasar Garzon
Although Iran has admitted it is detaining al-Qaida suspects, it denies allowing the network to operate from its territory.
Tehran said last December it had arrested 130 suspected members of al-Qaida and was ready to extradite some of them.
President Muhammad Khatami said: "those who have committed crimes in Iran will be judged in Iran and the others will be extradited to their country of origin ...
"There is no place for al-Qaida, no place for any terrorist, for those who act against peace in the world."
Khatami added al-Qaida was "very hostile" to the Iranian government.