The two were killed during a police operation on their residence in the Etimesgut district of ankara after a gunfight with officers, state-run news agency Anadolu quoted regional governor Ercan Topaca as saying.

The raid was launched on the basis of testimony from a suspected Azerbaijani isis member who was detained by Istanbul police after allegedly driving the two men to ankara .

"This (police) operation was quickly planned after this suspect said they and the two others he left in ankara were Daesh (ISIS) members and planning an attack," Topaca said.

He said police opened fire after the two suspects themselves fired on the security forces.

After "neutralising" the two men, guns and hand grenades were found, Topaca said.

Although the identities and nationalities of the two men have yet to be confirmed, Topaca said they believed they were aged between 25 and 30.

"We believe they were planning an attack likely in the next few days. The weapons, explosives were effective and powerful," he said.

During the past 18 months, Turkey has been hit by a wave of attacks blamed on isis and Kurdish militants, killing hundreds in cities like Istanbul, ankara and the southeastern city of Gaziantep.

The raid comes nearly six months after an isis gunman killed 39 people in attack on the elite Reina nightclub during New Year celebrations in Istanbul.

The shootout took place as ankara was hosting a special congress of the ruling Justice and Development Party (AKP) that was set to again choose President Recep Tayyip Erdogan as its chairman. But there was no indication of any link to the congress.