Abdel Majed Abdel Bary was caught in the southern town of Almeria, where he had been leaving an apartment sporadically with a face mask during the coronavirus lockdown, according to Spain's interior ministry and a European security source.
British media said Bary used to have joint British-Egyptian national, but was stripped of U.K. citizenship after joining IS.
Two other suspects were arrested with him on Tuesday, Spain's interior ministry said in a statement. "This is a significant arrest," the security source told Reuters.
Media, including Britain's The Guardian, said he was the son of Adel Abdul Bary, who is serving a 25-year sentence in a U.S. prison over the 1998 bombings of U.S. embassies in Kenya and Tanzania that killed 224 people.
Bary has appeared in gory propaganda pictures of IS crimes, the Spanish ministry statement said.
"The detained man spent several years in the Syria-Iraq area and presents peculiar personality features such as an extremely violent criminal profile which caught the attention of police and intelligence services in Europe," it added.
The three suspects had come into Spain via North Africa. Spanish police were trying to determine if the other two were IS members also.
They are eager to intercept many of the dozens of Spanish Muslims who left for Syria and Iraq to fight alongside IS and may now want to perpetrate attacks on home soil such as the killing of 16 people in Barcelona in 2017.Britain's interior ministry had no comment, referring queries to Spanish police.