Turkey's state-run Anadolu news agency says police have detained several suspects in anti-Islamic State raids across the capital Ankara and "liberated" over two dozen students in one of their schools.

Counterterrorism police conducted simultaneous operations at 20 locations early Friday, detaining 17 suspected IS members.

Anadolu said one location was a bookstore which operated as a school for young children. It said 22 girls and four boys recovered there would be returned to their families.

The school recruited its students via social media advertisements but Anadolu didn't specify how old the children were.

IS is blamed for several recent attacks in Turkey, including a suicide bombing at a wedding last week that killed 54 people.

Turkey supported Syrian rebels taking back the IS-held border town of Jarablus earlier this week.