A year before Islamic State established its extremist caliphate in Syria and Iraq, Abdulmunam Almushawah noticed a disturbing development from more than 1,000 miles (1,600 km) away in Saudi Arabia.

The head of a program financed by the Saudi government that tracks jihadis online said he saw new trends emerging among the militants as early as 2013. They were forming technical groups to help radicals send encrypted messages. There was a flurry of activity in French, and calls for jihad in Europe were mounting. Two years later, there were massacres in Paris, first at the satirical magazine Charlie Hebdo in January and then at multiple targets in November.

"We understood that they had been building today's reality," Almushawah said in an interview at his base in Riyadh. "What happens in real life has a previous shadow in the electronic world."