A Turkish official says police in the capital have fatally shot a suspected Islamic State group militant who was planning a suicide bombing.

Ercan Topaca, the governor for Ankara, says the man was killed in a raid on an apartment early Wednesday after he ignored warnings to surrender and opened fire on police.

The state-run Anadolu Agency quoted Topaca as saying the man was believed to be planning a suicide attack in the city either targeting large gatherings or to coincide with two national ceremonies in the coming weeks.

Turkey has been rocked by a series of deadly suicide bombings over the past year carried out by IS or Kurdish militants.

Officials banned demonstrations or large gatherings in Ankara until the end of November citing intelligence over possible attacks.