Spanish police infiltrated an ISIS terror cell that was allegedly encouraging attacks against France.
The cell was discovered in Granada and is accused of using social media accounts to encourage almost 20,000 people to carry out atrocities.
Dozens of armed officers from the Spanish National Police conducted raids on properties after a six-month investigation.
Three people were arrested on suspicion of inciting violent attacks against French people.
Footage of the raids showed armed officers entering the building, arresting the suspects and removing boxes of evidence.
"The three detainees are imprisoned for encouraging terrorist actions against French citizens and interests," Policia Nacionale tweeted.
"After the French magazine Charlie Hebdo republished caricatures of the Prophet Mohammed in September of last year, the arrestees posted numerous videos on their social media accounts threatening to carry out violent actions against France, its citizens and interests abroad to avenge the said-publication," Europol said.
"The Spanish National Police used its specialist capabilities to identify the individuals behind these social media profiles, which had a total of 19,000 followers.
"The seriousness of these threats, together with the suspects’ social media following, represented a serious security concern."
Spanish police said the threats "represented a clear risk to public security, not only in Spain but also in France".
Describing the suspects as "highly radicalised", police said they had used their social media profiles extensively and posted videos to "encourage acts of terror and violence against French individuals and institutions" through different accounts.
The investigation began in October, a month after Charlie Hebdo reprinted the caricatures that made the satirical magazine the target of a deadly attack in 2015.
After identifying those involved, the police tracked them online and found they were "very active", creating content specifically aimed at "a younger audience".
The accused uploaded content by extremist leaders and made videos in which they "encouraged violent acts, mainly against France, its citizens and its President", Emmanuel Macron.
Police seized a large amount of material, including phones, digital devices and paperwork "of great interest", which is still being analysed.
All three are remanded in custody.
The operation was carried out by police from Granada and the northern Spanish port city of San Sebastian, with the support of Europol.
In January 2015, gunmen staged deadly attacks on Charlie Hebdo and a Jewish supermarket, killing 17 people over three days.
The gunmen, who were all shot dead by security troops, said they acted over the magazine's decision to publish the cartoons.
In September 2020, Charlie Hebdo republished the controversial caricatures to mark the opening of a trial of suspected accomplices in the attack.
Three months later, a Paris court handed jail terms ranging from four years to life to more than a dozen people convicted of helping the gunmen.