Update 8.22pm: Russian President Vladimir Putin said today that the killing of Ambassador Andrei Karlov was a "provocation aimed at derailing Russia-Turkey ties and the peace process in Syria".
Turkish President Recep Tayyip Erdogan, in a video message being shown on several Turkish TV channels, says that "this is a provocation to damage the normalisation process of Turkish-Russian relations".
"But both the Russian and Turkish administrations have the determination not to fall for this provocation," he added.
Both leaders said that Russian investigators will be part of the official probe into the assassination.
Turkey's interior minister later said that the gunman who assassinated the ambassador was a policeman.
Suleyman Soylu said that the gunman was working for the riot police squad in Ankara for the past two-and-a-half years.
He identified the attacker as Mevlut Mert Altintas, who was born in 1994.
Russia's ambassador to Turkey has died after an attacker opened fire at a photo exhibition in Ankara.
The ambassador, Andrei Karlov, was several minutes into a speech at the embassy-sponsored exhibition in the capital when a man wearing a suit and tie shouted "Allahu Akbar" and fired at least eight shots, according to an AP photographer in the audience.
Turkish police have also fatally shot the gunman involved, according to the NTV news channel. He is understood to have been a police officer in his early 20s.
Three other people injured were still inside the gallery, according to reports.
It was reported that the gunman shouted in Turkish ahead of the shooting: "Don't forget Aleppo. Don't forget Syria."
The man then yelled: "Stand back. Stand back. Only death will take me out of here...Anyone who has a role in this oppression will die one by one."
He also smashed several photos which were part of the exhibition.
Video showing the moments after Russia's ambassador to Turkey Andrey Karlov was shot dead in Ankara. https://t.co/VguZ5TZp8S— Sky News (@SkyNews) December 19, 2016
Hasim Kilic, a correspondent for the daily Hurriyet, told AFP: "He said something about 'Aleppo' and revenge."
There was panic as people ran for cover after the shots were fired, with three other people reportedly wounded in the attack.
Foreign ministry spokeswoman Maria Zakharova said Mr Karlov was shot "when an unidentified assailant opened chaotic gunfire during a public event in Ankara".
She later confirmed the ambassador had died, adding that Russia was in contact with Turkish officials about the incident.
Ankara mayor Melih Gokcek told reporters outside the exhibition centre that the "heinous" attack had aimed to disrupt newly-re-established relations between Turkey and Russia.
US state department spokesman John Kirby said US officials are aware of reports about the shooting.
"We condemn this act of violence, whatever its source," Mr Kirby said. "Our thoughts and prayers are with him and his family."
Three other people were wounded in the attack, NTV said.
Mr Karlov, 62, joined the diplomatic service in 1976, and went on to serve as Russia's ambassador to Pyongyang from 2001-2006.
He later worked as the chief of the foreign ministry's consular department, and had been Russia's ambassador to Turkey since 2013.