Spanish police have arrested a Moroccan man in Barcelona with suspected links to Islamic State who they believe was planning a militant attack.
The Guardia Civil force said it had arrested the man, described as deeply radicalised, after a joint investigation with security forces in Morocco and the United States.
"The suspect intended to carry out a terrorist act, the details of which are unknown," police said in a statement.
His links to Islamic State date back at least four years, police said, though he had not displayed any outward signs of radicalisation until recently.
After Spain imposed a coronavirus lockdown on 14 March, his interest in the jihadist movement increased, police said.
Since then, the suspect made public pledges of allegiance to Islamic State and declared his hatred of the West on social media, police said.
He also made several furtive trips around the city, during which police believe he was scouting out potential targets for an attack.
Police said he was likely to have been responding to calls from Islamic State for followers in the West to carry out attacks in the countries where they live.
In April, security forces in the southern city of Almeria captured arrested a British rapper who was on the run after fighting for the jihadist movement in Iraq and Syria.