Europe's biggest terrorist threat is Morocco (search) — seething with as many as 1,000 Al Qaeda adherents capable of homicide attacks and skilled at slipping through the continent's southern gateway, Spain's leading anti-terrorism judge testified Thursday.

The impoverished kingdom just a short ferry ride across the Strait of Gibraltar has about 100 Al Qaeda (search)-linked cells that raise money by dealing hashish, fencing luxury cars and smuggling people into Spain, Judge Baltasar Garzon (search) told lawmakers investigating the Madrid train bombings. Most of the 17 suspects jailed in the March 11 bombings, which killed 190 people, are Moroccan.

"They use every means and mechanism, and their activity can even be initially perceived as ordinary delinquency," Garzon said of the cells.

"In my opinion it is the gravest problem Europe faces today with this kind of terrorism."

Garzon said his figures came from police and intelligence data.

Officials at the Moroccan Embassy could not be reached to respond to Garzon's allegations. Morocco, too, has done its share of finger-pointing at Spain since the train bombings (search), but both countries have pledged to work more closely against terrorism.

Garzon said his first reaction to the train bombings was that Al Qaeda was responsible, not Basque separatists as initially claimed by the government. He cited the scale of the carnage and the level of coordination — 10 nearly simultaneous blasts from backpacks full of dynamite and shrapnel.

"The spectacle was absolutely horrifying," Garzon said. "It is probably the most shocking thing I have ever seen and I hope it is the last."

Garzon said he had second thoughts when police told him — in error — that the explosives were a brand favored by Basque separatists, but he became convinced the attacks were linked to Islamic extremists hours later after learning that a van containing detonators, explosives and a tape with Quranic verses was found near a rail station.

"It was like a light bulb going on," Garzon said, referring specifically to the tape. "I had no doubt whatsoever."

At that point the government already blamed the Basque group ETA (search), and even after disclosing the existence of the tape it continued to insist ETA was the prime suspect.

Spain's then-conservative government at first backed the U.S.-led Iraq war despite fierce opposition at home, sending 1,300 troops after major combat ended. After the train bombings, it feared that word of an Islamic link would doom it in general elections due in three days.

Voters did punish the government, electing Socialists who opposed the war and quickly brought the soldiers home.

Garzon testified before the 16-member commission as an expert on Islamic terrorism after investigating extremist groups in Spain since 1989.

The National Court, where Garzon works, is conducting the main probe of the bombings, but Garzon is not directly involved. The separate, legislative inquiry is aimed at examining the government's handling of the massacre and whether it could have been averted through warnings from intelligence agencies.

Last month, Garzon completed an eight-year investigation that led to indictments against 41 Al Qaeda suspects, including Usama bin Laden, accusing him and a dozen others of preparing the Sept. 11 attacks.

Morocco was hit by a string of terrorist bombings on May 16, 2003, killing 45 people, including 12 homicide bombers. One of the main targets was a Spanish restaurant and social club, and four of the victims were Spaniards.

Moroccan authorities blamed Al Qaeda and reacted with a crackdown on fundamentalist suspects, arresting more than 5,000 people, although most were released. But 700 remain behind bars and 17 face the death penalty, which has not been imposed in Morocco since 1993.

After the Madrid bombings, Moroccan authorities insisted they had warned Spain about one of the key suspects, a Moroccan named Jamal Zougam.

There also is a recent history of ill will between the countries: there have been disputes over fishing rights, illegal immigration and territorial claims that nearly led to a military clash in 2002.

Garzon said Thursday the Spanish government's support for the Iraq war was probably only one factor leading to the terrorist attack.

Islamic cells have been present in Spain since the early 1990s, and Muslims in North Africa maintain a historic claim to the Spanish territory that the Moors ruled for 800 years and called al-Andalus, Garzon said.

Al Qaeda has struck other countries since Sept. 11, including Indonesia and Turkey. For Spain, he said, "maybe it was just a question of time."