Turkey's Foreign Ministry confirmed in a statement an "employee was martyred" in an "atrocious attack" outside the consulate in the Iraqi city of Erbil.
Turkish Foreign Ministry confirmed one Turkish Consulate personnel was killed in an attack on Wednesday at a restaurant in Iraq's Erbil city.
Turkey condemned and vowed to respond to the attack.
"I condemn the atrocious attack on our consular employees in Erbil. I wish God's mercy on our employee who was martyred in the attack. We are continuing our efforts with the Iraqi authorities and local authorities to ensure that the perpetrators of the attack are found quickly," Turkish President Recep Tayyip Erdogan tweeted on Wednesday.
If needed, Ankara will send a delegation to Erbil, Turkey's Foreign Minister Mevlut Cavusoglu said on Wednesday.
Speaking to reporters in the capital Ankara, Cavusoglu said three attackers were involved in the incident and Turkey is in contact with Baghdad and Erbil.
According to the restaurant owner, the attacker, in plainclothes and carrying two guns, targeted the Turkish diplomat dining in a restaurant in Erbil.
Presidential spokesman Ibrahim Kalin vowed on Twitter, "the necessary response will be given to those who committed this treacherous attack."
Two Iraqi nationals were also shot and killed in the restaurant, Iraq's Foreign Ministry spokesman Ahmed Sahhaf said.
TRT World 's Yusuf Erim has more details.
Erbil's police chief Abdulhalik Talat said an investigation was immediately launched into the incident and detailed information will be shared later.
All the roads leading to other cities were blocked to prevent the attackers from escaping.
Security forces took measures in front of the restaurant, Huqqabaz, after the attack.
The last Turkish diplomat killed on duty was Omer Haluk Sipahioglu in 1994 in the Greek capital Athens.
Sources have told TRT World that the PKK terrorist group is believed to be behind the attack.
Turkey launched a military offensive in May against the terror group in northern Iraq.
The PKK is an armed group that has been fighting the Turkish state since 1984, a couple of years after it was founded. The fight has left more than 40,000 killed, including civilians.
The PKK has been designated a terror organisation by Turkey, the US and the EU.
They have been based in the mountainous northern parts of Iraq on the Turkish border since 1982. The group, which carried out several suicide bomb attacks targeting civilians in Turkey, has strengthened its positions in northern Iraq since the fall of Iraqi regime leader Saddam Hussein after the US invasion in 2003.
Secretary of State Mike Pompeo condemned the attack "in the strongest possible terms."
"There can be no justification for such acts of wanton violence," Pompeo said in a statement.
"We extend our deepest condolences to the families of the victims and hope for a speedy recovery of any wounded."
The top US diplomat further reaffirmed support for the Turkish and Iraqi governments and people.
We express our deepest condolences to the family, friends & colleagues of the Turkish Consulate General employee who was killed today in the heinous attack in Erbil. We condemn this attack in the strongest possible terms. @MFATurkey https://t.co/MurfGlB3Jp— US Embassy Turkey (@USEmbassyTurkey) July 17, 2019
UK's Minister of State for Europe and the Americas Sir Alan Duncan said he was "appalled to hear of fatal attack against Turkish diplomats," in a Twitter message.
"The killing of a diplomat is beyond despicable," Duncan wrote.
"The UK offers condolences to our Turkish allies and condemns this atrocity in the strongest possible terms," he added.
Iraq's Foreign Ministry also condemned the attack targeting a Turkish diplomat in Erbil, adding that the Iraqi government is working in coordination with Turkish authorities to find the perpetrators.
The leader of Turkey's main opposition party also condemned the attack.
"All our neighbours, all countries should know that our diplomats, our friends working abroad represent the Republic of Turkey. Each attack on them is an attack on the Republic of Turkey," Kemal Kilicdaroglu, Republican People's Party (CHP) leader, told journalists at Esenboga Airport in Ankara.
The Embassy of Pakistan in Turkey also offered condolences.
Deepest condolences at the martyrdom of the Turkish Consulate official in Erbil in a heinous attack earlier today; The attack must be investigated and perpetrators brought to justice #Erbil— Pakistan in Turkey (@PakTurkey) July 17, 2019