A Turkish diplomat was among two people killed in an attack in Irbil, the capital of Iraq's Kurdistan Region.
The victims are thought to be Turkey's deputy consul general in the city and a civilian. Turkey has already vowed to retaliate.
The diplomat was among a group of people eating at a restaurant when gunmen opened fire.
No-one has so far claimed the attack, but Kurdish rebels who have fought Turkey for decades operate in the area.
In a statement on Twitter, Turkish presidential spokesperson Ibrahim Kalin said a "necessary response will be given to those who committed this treacherous attack".
President Recep Tayyip Erdogan also tweeted that they were working with the Iraqi authorities to find the perpetrators.
"I condemn the hateful attack against our consulate workers in Erbil," he wrote. "I wish God's mercy on our staff member who was martyred in the attack."
What do we know about the attack?
What do we know about the attack?
Details are still emerging, but the shooting took place on Wednesday afternoon at HuQQabaz restaurant in Irbil's Empire City neighbourhood.
Initial reports said that three diplomats had been killed in the attack.
But the Kurdistan Region's internal security forces, known as the Asayish, later said that two people had been killed, including Turkey's deputy consul general.
The Asayish did not say if the other two victims were also Turkish consulate staff.
The three attackers are thought to still be at large, Turkish Foreign Minister Mevlut Cavusoglu told broadcaster NTV.
"We are collaborating with the Iraqi authorities to find the perpetrators, to find out the motive, and to make sure all details are unveiled," he said.
An Iraqi foreign ministry spokesman also condemned the killing, and said it would be closely following the investigation by the regional Kurdish government.
What's the background?
The shooting comes as Turkey continues its crackdown on Kurdistan Workers' Party (PKK) militants in the area.
More than 40,000 people have been killed in the PKK's conflict with Turkey over Kurdish autonomy, which began in 1984.
PKK fighters use mountainous areas along the border between Turkey and Iraq's Kurdistan Region as a sanctuary and to stage attacks. In response, the Turkish military frequently carries out cross-border air strikes and ground raids on PKK positions.
Last Friday, Turkey announced that it had launched an operation involving commandos, air strikes and artillery targeting PKK positions in the Xwakurk (Hakurk) area, near the borders with Iran and Turkey.
Turkey has also put pressure on Iraq's government and the Kurdistan Regional Government to help it contain the PKK.
Guney Yildiz, BBC News
Although no-one has said they were behind the attack, it coincides with the killing of several senior PKK leaders in Turkish air strikes on Iraq's Kurdistan Region, as well as an ongoing cross-border operation by the Turkish military, and the reported build-up of Turkish troops on the frontier with Kurdish-controlled northern Syria.
Turkey's targeting of the PKK leaders - including Diyar Gharib Mohammed, who sat on the presidential council of an umbrella organisation to which the PKK belongs - was a significant development. For most of the past four decades of conflict both sides generally refrained from targeting each other's leaders.
Wednesday's attack is likely to lead to the Kurdistan Regional Government and the Kurdistan Democratic Party (KDP), which controls Irbil, coming under pressure from Turkey to join its operation against the PKK.
Last month, a group called the Self-Defence Forces of Southern Kurdistan was established in the region to attack Turkish military outposts and remove Turkish "occupiers". It was not clear whether the new group was linked to the PKK.