The violence of Syria’s bloody civil war has had a shocking repercussion beyond its borders with the assassination of Russia’s ambassador to Turkey in Ankara in what appeared to be revenge for his country’s part in the assault on Aleppo.

Andrey Karlov was killed at an art gallery in Ankara by a gunman who shot him eight times at close range. Standing over the 62-year-old diplomat’s body the assassin, wearing a black suit and tie, was heard shouting “Don’t forget Aleppo, don’t forget Syria. Unless our towns are secure, you won’t enjoy security. Everyone who is involved in this will pay a price. Only death can take me from here.”

Firing more shots into the fallen ambassador’s body he declared: “We are the ones who pledged allegiance to Mohammed, to wage jihad.”

Film footage taken at the scene showed the killer repeatedly gesticulating with a pistol in his hand. There had been heavy security around Mr Karlov’s presence at the art gallery, but, according to one of the guards, the gunman had entered by showing a police ID card and saying that he was an officer in the public order department.

The killer was identified as Mevlut Mert Aydintas, 22, by Turkey’s interior minister – and it was suggested he was a member of the Ankara riot police.

Turkish special forces, it was reported, had shot the gunman dead. The government of Recep Tayyip Erdogan pledged that those behind the murder will be found and punished. In Moscow, Vladimir Putin held an emergency meeting with foreign minister Sergei Lavrov and the heads of intelligence agencies.

"A crime has been committed and it was without doubt a provocation aimed at spoiling the normalisation of Russo-Turkish relations and spoiling the Syrian peace process which is being actively pushed by Russia, Turkey, Iran and others," said Mr Putin.

"There can only be one response – stepping up the fight against terrorism. The bandits will feel this happening."

Mr Putin, who said he personally knew the murdered envoy, said he had agreed in a phone call with his Turkish counterpart that Russian investigators would soon fly to Ankara to help the Turks with the investigation.

"We must know who directed the killer's hand," Mr Putin told Mr Lavrov, Sergei Naryshkin, the head of his SVR foreign intelligence service, and Alexander Bortnikov, the head of the domestic FSB security service.

Mr Putin ordered security at Turkish diplomatic facilities in Russia to be stepped up and said he wanted guarantees from Turkey about the safety of Russian diplomatic facilities.

"I also ask you to implement the agreed proposals on strengthening security at Russian diplomatic facilities abroad," Mr Putin told the meeting.

The killing came a day before the Turkish foreign minister, Mevlut Cavusoglu, was due in Moscow to meet Russian and Iranian ministers to discuss the war in Syria.

There was trepidation over what may now follow the killing. Fatih Oke, a senior Turkish diplomat in Washington wrote on twitter “The bullet to Ambassador Karlov is not only aimed at him, it aims also at Turkey’s relations with Russia”.

Speaking outside the hospital where Mr Karlov was taken after the attack, Melih Gokcek, the mayor of Ankara, echoed this, saying “this was done to ruin what is between us and Russia”.

A Turkish security official told Reuters that Ankara saw "very strong signs" the gunman who killed Russia's ambassador there on Monday was a follower of a US-based Muslim cleric blamed for orchestrating a failed coup by sections of the military in July.

A representative of cleric Fethullah Gulen, Alp Aslandogan, denied any link and said the exiled cleric condemned the murder as a "heinous act".

The Turkish official, who declined to be identified, said the current investigation was focused on the gunman's links to the network of Gulen's followers, which the government calls the "Gulenist Terrorist Organisation" or "FETO".

There was swift condemnation of the murder from the West. US State Department spokesman John Kirby said: “We condemn this act of violence, whatever its source. Our thoughts and prayers are with him and his family.” In London, Foreign Secretary Boris Johnson said he was “shocked to hear of the despicable murder of Russia’s ambassador to Turkey. I condemn this cowardly attack".

Mr Karlov may not have been just a target of opportunity for those trying to lash out at Moscow over its role in the Syrian conflict. He had been extensively involved in Syrian affairs, playing a key role in the negotiations between Turkey and Russia which led to the evacuation of civilians and rebels from eastern Aleppo after the opposition held part of the city was overrun by the forces of Bashar al-Assad. The ambassador had also, it was said, played a part in convincing the Iranians, supporters of the regime with militia fighters present on the ground in Aleppo, to accept the deal.

He also served as ambassador to both North and South Korea for a prolonged period before arriving in Ankara and was widely respected in the international diplomatic circuit.

Russia and Turkey had been locked in a confrontation after the shooting down of a Russian warplane by the Turks last year. But relations thawed after an apology from President Erdogan, and the two countries have been cooperating on Syria, something Mr Karlov had also helped engineer.

Russian ambassador to Turkey shot dead in Ankara Show all 13 1 /13 Russian ambassador to Turkey shot dead in Ankara Russian ambassador to Turkey shot dead in Ankara The unnamed gunman gestures after shooting the Russian Ambassador to Turkey AP Russian ambassador to Turkey shot dead in Ankara The gunman opened fire at a photo gallery in Ankara, Turkey AP Russian ambassador to Turkey shot dead in Ankara Russian Ambassador to Turkey Andrei Karlov was delivering a speech when the gunman opened fire AP Russian ambassador to Turkey shot dead in Ankara The gunman addressed the room after shooting the Russian Ambassador AP Russian ambassador to Turkey shot dead in Ankara The gunman spoke in Arabic after opening fire on the Russian ambassador to Turkey AP Russian ambassador to Turkey shot dead in Ankara The gunman stands over the body of Russian Ambassador to Turkey, Andrei Karlov, at a photo gallery in Ankara, Turkey AP Russian ambassador to Turkey shot dead in Ankara People in the art gallery react moments after the Russian ambassador to Turkey, Andrei Karlov, was shot dead AP Russian ambassador to Turkey shot dead in Ankara Turkish police secure the area near the art gallery where Andrei Karlov was shot REUTERS Russian ambassador to Turkey shot dead in Ankara The gunman reportedly shouted "Aleppo" and "revenge" after shooting Mr Karlov dead AFP/Getty Images Russian ambassador to Turkey shot dead in Ankara The gunman stands over the body of the Russian Ambassador to Turkey, Andrei Karlov AP Russian ambassador to Turkey shot dead in Ankara The gunman, a Turkish policeman, can be seen standing behind the Russian ambassador to Turkey, Andrei Karlov, before he opened fire AP Russian ambassador to Turkey shot dead in Ankara An ambulance leaves the area near the art gallery where the Russian Ambassador to Turkey Andrei Karlov was shot dead REUTERS Russian ambassador to Turkey shot dead in Ankara Guests leave as the gunman holds his weapon behind them AFP/Getty

There has, however, been anger in Turkey over the actions of the Assad regime and Russia in the war which had been heightened by the Aleppo assault with regular protests in Istanbul with liberals as well as Islamists taking part. In response, the Turkish authorities have put in additional security measures for Russian diplomatic staff and private businesses in the country.

It is unlikely that the murder would jeopardise the newly strengthened relationship between the two countries. But Mr Putin may well press Mr Erdogan to take more action against Islamist groups in Turkey and cut links with some of the hardline Sunni rebels Ankara had backed in Syria.

As for Mr Erdogan, he put out a very similar message to Mr Putin, saying that he had agreed in his telephone call with Mr Putin that their cooperation and solidarity in fighting terrorism should be even stronger after the killing of the Russian ambassador in Turkey.