ANKARA, Turkey — Turkish police have detained 27 people in Istanbul over suspected links to the Islamic State group Sunday, state-run media said Sunday.

The Anadolu news agency reported that the suspects were held in simultaneous early morning raids by anti-terrorist police in 15 districts across Istanbul as they allegedly prepared to carry out attacks.

The agency said the alleged attacks were in response to recent social media posts that insulted the Prophet Muhammad and that a "large number" of documents and digital material was recovered during the searches.

Turkey has suffered a number of attacks by Islamic State militants over the last five years, including the bombing of a peace rally in the capital Ankara in October 2015 that killed 102 people.