Two young women suspected of planning an attack in France were detained by police in the southern French city of Nice, a person familiar with the investigation said Sunday, the latest sign that Islamic State is shifting its focus from the battlefield in Syria to orchestrating terror plots in Europe.

The two young women—17 and 19 years old—had been in contact with Rachid Kassim, a French recruiter for Islamic State, on the Telegram Messenger messaging app, the person said. Mr. Kassim, who is believed to be in Islamic State territory, couldn’t be reached for comment.

Mr. Kassim called on the women to attack specific sites in France to avenge the death of Abu Mohammed al Adnani, a founding member and chief spokesman for Islamic State, who was killed on a battlefield in northern Syria last month, the person added, without providing further details.

Even as Islamic State loses territory in Syria and Iraq, the mushrooming of small-scale terror attacks in Europe has allowed the militant group to keep people here on edge, without having to train and equip teams to pull off highly sophisticated operations.

Over the past year, a spate of terror attacks has left more than 200 people dead in France.

Click for more from The Wall Street Journal.