The suspect, named as Abdeluahid Sadik Mohamed, was nabbed at Malaga airport in southern Spain today after arriving on a flight bound from Istanbul, a statement said.
He had had left Casablanca, Morocco, on May 2 to travel to Syria, which he entered by crossing the Turkish border after spending a few days in Istanbul.
Once in Syria, he trained in a camp belonging to the Islamic State of Iraq and the Levant (ISIL), a terrorist organisation linked to al-Qaida, the statement says.