ISTANBUL — Russia’s ambassador to Turkey, Andrei Karlov, was shot and killed in Ankara on Monday by a young Turkish policeman who cried out that it was “revenge” for Russian bombing that killed civilians in Aleppo, witnesses said.

Karlov was attending the opening of a photography exhibition at a city gallery close to the U.S. Embassy when the assailant approached him and fired at close range.

Turkish officials said the ambassador was taken to the hospital, but reporters who attended the gallery opening said he had not been removed from the building. Russian state media has confirmed Karlov’s death.

The attack occurred shortly after 7 p.m. local time, and reporters arriving at the scene a half hour later said they heard gunfire from within the building. TV footage, captured on Turkish channel TRT, shows Karlov doubling over and collapsing after being shot from behind while addressing a crowd from a podium. The gunman then comes into view, raises a finger in the air and points his weapon at unseen targets off-screen. One eyewitness said that the assailant spoke Turkish.The gunman was dressed in a black suit, the standard plainclothes uniform for protective security details, and got into the event by claiming to be Karlov’s bodyguard, witnesses said.As he started to fire, he shouted in Turkish that he was avenging the deaths of civilians in Aleppo and in Arabic that his action was a part of jihad or holy war."We will not forget Aleppo, we will not forget Syria,” he said in Turkish. "No one can be safe as long as our brothers there are not. Get out of my way.”Then he declared in Arabic, "Allahü Akbar!” (God is great!), and quoted a follower of the Prophet Mohamad, 'We are the ones who pledged Bai'a (fealty) to Mohammed on the terms of jihad as long as we live.''

Several Turkish media outlets are now reporting his identity as 22-year-old riot policeman Mevlut Mert Altintas and the mayor of Ankara has said that he was off-duty at the time of the incident. The Daily Beast cannot confirm this information.

According to Russian news website Gazeta.ru, the shooter allowed people to exit the art gallery after he shot the ambassador.

The Russian Embassy in Turkey tweeted confirmation of Karlov's death at around 1 p.m. EST: "At 19:50 the Russian ambassador to Turkey Andrei Gennadievich Karlov was taken to Gyuven hospital," it stated, "where we were informed at 20:30 of his death."

The assassination occurred on the eve of a scheduled meeting of Russian, Turkish and Iranian foreign ministers to discuss next steps in the Syria crisis after the Assad regime, with the help of Russian airstrikes and Iranian-commanded Shiite militias, captured rebel-held East Aleppo and expelled tens of thousands of civilians.

The last convoys were expected to move Tuesday, Turkish officials said.***Reaction in both Russia and Turkey has been swift, incensed and conspiratorial.Alexey Pushkov, the former head of the foreign affairs committee of the Russian State Duma, or lower house of parliament, has claimed the killing was a direct result of media "hysteria" concerning Aleppo, purveyed by "enemies" of Moscow. Vladimir Zhirinovsky, a far-right Russian nationalist parliamentarian, claimed that the West orchestrated the shooting to prevent Turkish-Russian rapprochement following close to a year of a breach, which has gradually narrowed in recent months.Russian Foreign Ministry spokeswoman Maria Zakharova issued a statement: "Terrorism will not pass! We will fight it resolutely. Memory of this outstanding Russian diplomat, a man who did so much to counter terrorism in his diplomatic line of work, Andrei Gennadyevich Karlov, will remain in our hearts forever.""We have questions for Turkey, that failed to provide security for a such a high-profile diplomat. I have no doubts that radical islamists moved the murder's hand and it does not matter if they were from [ISIS] or from Jabhat al-Nusra Front," Russian senator Franz Klinzewitsch said today, referring to the al-Qaeda franchise in Syria. "The purpose is clear: they wanted to pay a revenge to our country for Syria and at the same time to try and cause a forehead to forehead confrontation between Russia and Turkey." Meanwhile, pro-government journalists in Turkey are beginning to suggest that the assassin was affiliated with the Islamist movement of exiled cleric Fethullah Gülen, who is widely blamed in the country for orchestrating last July's abortive coup. (He lives in the Poconos of Pennsylvania and Turkey is seeking his extradition from the United States.)Tens of thousands of Turkish officials and public employees have been arrested in a sweeping national dragnet following the failed putsch, although Altintas does not appear to have been one of them.Ankara's mayor, too, has suggested that Gülenists were ultimately behind the assassination.

***Turkish-Russian relations reached a nadir in November 2015 after after the Turkish Air Force downed a Russian fighter jet that had briefly entered Turkish airspace en route from a bombing raid in Syria. One of the pilots who ejected from the hit warplane was subsequently killed by Syrian rebels as he parachuted down.

The episode led to the suspension of trade, touristic and other commercial endeavors and a period of great acrimony between the two countries. Russia implemented a blockade on Turkish imports such as a cotton, and Vladimir Putin responded militarily, refocusing his intervention in Syria on destroying Turkish-backed rebels operating in the mountainous coastal region of Latakia and Idlib provinces.

Turkish President Recip Tayyip Erdogan issued what amounted to an apology for downing the plane, Ankara and Moscow revived their relationship to a remarkable extent.

Putin was the first foreign leader to call Erdogan after the July coup attempt to offer his unconditional support to the surviving government. Then, in August, Erdogan sought Russia’s consent to deploy Turkish forces into northern Syria as part of the months-long Operation Euphrates Shield, which was waged both to eliminate the presence of Islamic State militants at the Turkish-Syrian border but also to block any attempts by U.S.-backed Kurdish militias, seen as affiliates of a proscribed terrorist organization by the Turkish state, from carving out a separatist enclave.

Also, in yet another show of diplomatic rehabilitation, the initial ceasefire and “evacuation” agreement for trapped civilians and rebels in Eastern Aleppo was brokered by Turkey and Russia. Bashar al-Assad’s regime, and his Iranian patrons, were not consulted.

Now, with the ambassador's death, Turkey's fragile peace with Russia may be in peril.

—With additional reporting by Duygu Guvenc in Ankara and Pierre Vaux in London and Anna Nemtsova in Moscow