ISTANBUL — A man suspected of being an Islamic State suicide bomber stabbed and killed a police officer Sunday while in custody in Istanbul, according to Turkey’s official news agency.

Anadolu Agency said police in an anti-terror operation detained a man thought to be planning a bomb attack on behalf of the extremist IS group.

The suspect was being taken to the main Istanbul police station escorted by two police officers when he fatally stabbed an officer, according to police.

Turkey has endured multiple bomb attacks since 2015, blamed on the Islamic State group and Kurdish militants, as well as a failed coup attempt. Combatting terror is high on the political agenda.

It was unclear how the suspect in the police station attack had access to a knife.

The suspected IS member was shot and killed outside the police station.