A number of militants involved in those earlier attacks had roots in Morocco, including Abdelhamid Abaaoud, a ringleader of the Paris attacks; the brothers Salah and Ibrahim Abdeslam, who were among the Paris attackers; Mohamed Abrini, who accompanied two suicide bombers in the airport attack; Najim Laachraoui, a bomb maker who blew himself up at the airport; and the brothers Ibrahim and Khalid el-Bakraoui, who died in the Brussels bombings. Salah Abdeslam and Mr. Abrini are being held while awaiting trial.

In addition, two of the three men who carried out the attack on and around London Bridge in June were Moroccan.

About 100,000 people with Moroccan citizenship live in Belgium, which has a population of 11 million. Moroccan-Belgians are the country’s largest minority group with roots outside the European Union.

Many Moroccan men were recruited in the 1960s to work in Belgium’s mines and factories on temporary contracts but stayed on, eventually joined by their families. Many then became Belgian citizens, and it is their children or grandchildren — albeit only a tiny fraction of the population — who have sometimes been drawn to jihadist ideology.

Often, according to experts who have studied the phenomenon, future militants start with petty crime and then search for an identity as a way to frame their illicit activity, or to atone for past misdeeds.

Islamic State supporters come from many backgrounds: The man who attacked police officers outside Notre-Dame Cathedral in Paris on June 6 was an Algerian, and the man who rammed into a police convoy on the Champs-Élysées on Monday was a French citizen.

Oussama Z., born in 1981, had lived for several years in Molenbeek, which was also the home of some of those connected to other attacks in the city and in Paris.