Rebels of the moderate Free Syrian Army were mystified in August when rival Islamic State militants suddenly took aim at a seemingly unimportant string of villages in the northern Syrian province of Aleppo.

As the extremist group’s propaganda and fighters on the ground quickly made clear, what fueled their offensive was one village in particular. The village, Dabiq, appears in sayings attributed to the Prophet Muhammad as the location of an end-of-days drama in which a Muslim army is to defeat its enemies, including a foreign...