The terrorist attack in Barcelona on August, 17, which killed 13 people and wounded scores, quickly led to the unearthing of an major terrorist cell in Catalonia.It actually began on the night of August 16, with a huge explosion at a house in the city of Alcanar, some 200 km. southwest of Barcelona, where two persons were killed and one injured. It appears this was the entrenched “operational center” of the 12-member cell, all born in Morocco but with Spanish nationality, who lived in Ripoll, a mountain town of about 10,000 people, 100 km. north of Barcelona.The Alcanar house, occupied just a few months before the blast, contained some 100 canisters of propane and butane, as well as traces of the explosive triacetone (TATP), proving that the cell had plans to commit far-reaching attacks, possibly even bombing the towering basilica of the Sagrada Familia. The destruction of the warehouse of explosives led the terrorists to decide to use cars and knives instead.While La Rambla Street in Barcelona experienced its nightmare attack, five members of the cell headed to Cambrils (Tarragona) in an Audi A3, and at around 1 a.m. managed to reach the tourist resort 110 km. southwest of Barcelona. The five, some of whom were wearing fake suicide belts, attacked passersby with knives and axes and were shot dead by police. A woman was killed and five civilians and a police officer wounded.Younes Abouyaaqoub, the 22-year-old Moroccan driver of the Las Ramblas van, who fled the city, was found and killed by police not far from Barcelona on August 21.The three remaining members of the cell were arrested in Ripoll immediately after the attack, as the passport of one of them was found in the abandoned van in Barcelona.Neighbors in Ripoll are surprised that a “gang of young friends,” apparently integrated into the life of the community, who played in the local football team and maintained relations with the young people of the town, became terrorists. The 500 Muslims of Ripoll – 5% of its population – live in no ghetto and are well mixed in the community. The radicalization of the young Moroccans occurred quickly and didn’t show many external signs. Abouyaaqoub went assiduously to the mosque in Ripoll. The social media accounts of 17-yearsold Moussa Oukabir contained a series of Islamist comments. A few months ago, he began to contact through the Internet radicalized Muslims in France. He returned to Spain from a visit to Morocco about 10 days before the attack. His elder brother, Driss, was known as a small-time marijuana dealer, with a criminal record.The 45-year-old Abdelbaki Es Satty, enigmatic imam of the Annur Muslim community in Ripoll since earlier this year, most probably acted as the leader of the group. He was chosen because it is “very difficult to find an imam in this area and he was free,” according to the president of the community. Last June, Es Satty announced that he was leaving because he planned to return to Morocco. His disappearance coincides with the preparations of the cell to attack in Barcelona. Remarkably, Es Satty died in the explosion of the Alcanar chalet.Es Satty appeared linked, in the framework of “Operation Chacal,” to a group of jihadists arrested in 2006 in Vilanova i la Geltrú, accused of recruiting youths to be sent to Iraq. Before preaching in Ripoll, Es Satty was imam at the Al Furkan mosque in Vilanova i la Geltrú, located 42 km. from Barcelona.Es Satty was in jail for four years, until January 5, 2012, for hashish trafficking, after which he turned toward religion. He finally converged on Ripoll at the end of 2015. The Catalan police did not link him with terrorism. He regularly traveled both to Belgium and to Morocco. The mayor of Vilvoorde (Flemish Brabant town from where about 30 young people went to fight in Syria in 2014) has confirmed that Es Satty was a resident of his town between January and March 2016.The Islamic State’s Amaq News Agency issued a short statement on August 17, claiming the “perpetrators of the attack in Barcelona were Islamic State soldiers and the operation was carried out in response to calls for targeting coalition countries.”The Barcelona and Cambrils attacks are the most serious terrorist attacks in Spain since the March 11, 2004 bombing of trains in the Atocha railway station in Madrid, in which 198 people were killed and more than 1,400 wounded. It should be stressed that since then, Spanish police and security services have been very efficient in foiling dozens of planned terrorist attacks and arresting hundreds of Islamist and jihadi terrorists.Spanish police warned about a year ago that internal channels used by jihadists had intensified the dissemination of videos with tutorials that explained step by step how to use vehicles loaded with butane gas bottles to cause the greatest possible damage. On June 24, 2017, for instance, ISIS’s Nasher News Agency published posters calling for stabbings and vehicular attacks. Before the Barcelona attacks, 51 suspected jihadists had already been detained in Spain this year, while 69 were detained last year and 75 were detained in 2015, according to El Pais.The Catalan cell was most probably a local one, based on family (four pairs of brothers), personal and neighborhood relations. At least two members had petty criminal records. They were under the influence of the older imam, living in the small, almost secluded environment of an immigrant community in a small provincial town.It seems they didn’t have serious previous training, which explains the “work accident” with explosives. More interestingly they apparently didn’t access to firearms.The important points in the investigation now will be to track the visits to Morocco by Imam Es Satty and Moussa Oukabir and possible links to jihadists in Belgium and in France. It is well known that some 2,500 Moroccans have fought in Syria and Iraq; many have returned and many if not most of the jihadists involved in terrorist plots on Spanish soil were of Moroccan origin.The author is a senior research scholar at The International Institute for Counter-Terrorism (ICT) and Senior Research Fellow at the Institute for Policy and Strategy at The Interdisciplinary Center (IDC) in Herzliya, Israel.