ANKARA, Turkey (AP) — Turkish police have detained a suspected Iraqi Islamic State group militant and rescued a 7-year-old girl from Iraq’s Yazidi religious minority he had allegedly been holding captive, the state-run news agency reported Wednesday.

The man, identified by his initials S.O., was detained in an early morning raid in the capital Ankara, the Anadolu Agency reported. Another person, identified as N.H.R., was also detained during the raid.

The suspect had once served as an officer in the Iraqi army, the agency said, adding that police and the country’s intelligence agency had been monitoring his moves. They timed the raid so that the child wasn’t placed at risk, the agency reported.

The girl was later placed in the care of Turkey’s social services.

The IS group attacked the heartland of the Yazidi community, at the foot of Iraq’s Sinjar mountain, in 2014. Hundreds of Yazidis were killed and thousands of women and children were abducted, many forced into slavery.

A day earlier, police detained a French IS suspect near the French Embassy in Ankara, Anadolu reported. The woman, who was identified as Sarah Talib, was taken into custody as she approached the embassy to allegedly seek repatriation to France.

The pro-government Daily Sabah newspaper said Talib joined the IS group in Syria and is believed to have illegally crossed the border into Turkey.

Anadolu Agency said the woman would be deported to France following her questioning by counterterrorism police.