PARIS—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...