Ali Charaf Damache was detained on Thursday evening at a hotel in the tourist heart of Barcelona, the Catalan regional Interior Ministry confirmed on Friday.
Police were alerted to his presence in Barcelona thanks to a telephone tip-off to the emergency 112 number.
"We became aware that this person was in Barcelona earlier this week," said Jordi Jané, the regional interior minister for Catalonia in a press conference.
The 50-year-old holds both Irish and Algerian nationality and is wanted by the United States for alleged membership of a terrorist cell linked to al-Qaeda that recruited and radicalized Muslims and financed and planned terrorist attacks.
The US issued an international arrest warrant for him in July 2011 and he was detained in Ireland last year although two extradition requests were denied and he was allowed to go free.
The US alleges Damache conspired with American woman Colleen LaRose, who used the online name Jihad Jane, and others to create a terror cell in Europe.
LaRose was sentenced in January 2014 to 10 years in prison after being convicted of planning to murder Swedish cartoonist Lars Vilks, who had depicted the head of the Muslim prophet Mohammad on a dog.
emerged unscathed from an attack in Copenhagen last February in which two people died when a gunman opened fire during a talk on freedom of expression in which the cartoonist was taking part.