(Warning: Graphic content) A gunman shot and killed Russia’s ambassador to Turkey, Andrei Karlov, as he gave a speech at a photo exhibition in Ankara on Dec. 19, 2016.

Russian investigators worked Tuesday to determine whether the assassination of their ambassador to Turkey was the work of a lone gunman or part of a wider conspiracy as the two countries, which have backed opposing sides in the Syrian war, said they would not let the killing disrupt efforts to repair their relationship.

In a separate attack, a man with a shotgun was detained after he fired into the air outside the U.S. Embassy in Ankara, the Turkish capital. No one was hurt.

Ambassador Andrei Karlov was shot dead Monday by a Turkish police officer who shouted slogans about Aleppo, a Syrian city where Russian bombardments have targeted rebel factions. Authorities identified him as a 22-year-old member of Ankara’s riot police squad, but did not disclose any motive for the attack.

On Tuesday, the foreign ministers of Russia and Turkey attended a previously scheduled meeting in Moscow, where they said they were committed to advancing peace efforts in Syria.

Turkish Foreign Minister Mevlut Cavusoglu said Turkey and Russia would work together to determine who was behind the "heinous terror attack" against Karlov, who was killed in front of a stunned audience while making remarks at a photo exhibition in Ankara.

Russian Foreign Minister Sergey Lavrov was hosting Cavusoglu as well as the foreign minister of Iran for a meeting to discuss the Syrian crisis. Top Turkish, Russian and Iranian defense officials were also meeting. Russia and Iran have backed the government of Bashar Assad, while Turkey has supported rebels fighting Assad.

"Turkey and Russia have shown the world what they can achieve when they cooperate," Cavusoglu said in at the start of the meeting with Lavrov. He was referring to a Turkish- and Russian-brokered peace deal that paved the way for the evacuation of thousands of people from the east of embattled Aleppo.

The presidents of Russia and Turkey, Vladimir Putin and Recep Tayyip Erdogan, agreed that the killing of the Russian ambassador "makes us more decisive in fighting terrorism and makes today’s meeting even more important," Lavrov said.

Both foreign ministers placed flowers in front of a photograph of the ambassador at the Russian Foreign Ministry mansion where talks were taking place. Cavusoglu said a street where the Russian Embassy in Ankara is located would be renamed for Karlov.

Karlov’s assailant, identified as Mevlut Mert Altintas, was later killed in a shootout with police.

An Associated Press photographer and others at the art gallery watched in horror as Altintas, who was wearing a dark suit and tie, fired at least eight shots, at one point walking around the ambassador as he lay motionless and shooting him again at close range.

A group of 18 Russian investigators and foreign ministry officials left for Ankara to investigate the killing, Putin spokesman Dmitry Peskov said. The ambassador’s body and his family will be brought back to Russia in the same plane that flew in the Russian experts, according to Russia.

Authorities are trying to determine whether Altintas acted alone or if his assault was an organized terror attack, Turkey’s Hurriyet newspaper reported.

His actions appeared to be well-planned. Altintas had taken leave from work on medical grounds and booked himself into a hotel near the exhibition center, Hurriyet said.

Turkish police detained three more people connected to Altintas on Tuesday, raising the number of people in custody to seven, Turkey’s state-run Anadolu news agency reported. They include the man’s parents, sister, three other relatives and his roommate in Ankara.

The assassination occurred after days of protests by Turks angry over Russia’s support for Syrian leader Assad and Russia’s role in the bombardment and destruction of parts of Aleppo.

Also Tuesday, Turkish police detained a man who fired shots in front of the U.S. Embassy, which is across the street from the building where the Russian ambassador was killed. It was not immediately known if the two incidents were connected.

The man took out a pump-action shotgun hidden in his coat and fired around eight shots in the air before embassy security guards apparently overpowered him, according to the Anadolu agency.

The U.S. Embassy said its missions in Ankara, Istanbul and the southern city of Adana would be "closed for normal operations on Tuesday."

Authorities increased security outside the Russian Embassy, and the Iranian Embassy was closed on Tuesday as a precaution. Russian Deputy Foreign Minister Oleg Syromolotov warned against traveling to Turkey, citing attacks that have hit the country over the past 18 months.

Associated Press