The Anadolu news agency said the gunman had been “neutralised” soon after the attack, which appeared to mark one of the most serious spillovers of the Syria conflict in Turkey. Relations between Moscow and Ankara have long been fraught over the conflict, the two supporting opposing sides.

The Russian foreign ministry confirmed the attack mounted as Ambassador Andrei Karlov made a speech at the opening of a photographic exhibition. Hurriyet newspaper said Turkish special forces had surrounded the building. NTV said three other people were wounded.

A Reuters witness said that while gunfire rang out for some time after the attack, it had now stopped. A Hurriyet newspaper reporter said the attacker chanted Islamist slogans.

Russia and Turkey have been involved in conflict in Syria across the border from where over two million Syrian refugees have settled. Turkey has been a staunch opponent of President Bashar al-Assad while Russia has deployed troops and its air force in support of the Syrian leader.

Tensions have escalated in recent weeks as Russian-backed Syrian forces have fought for control of the eastern part of the city of Aleppo, triggering a stream of refugees.

It was not immediately clear who carried out the attack. ISIS terrorists have been active in Turkey and carried out several bomb attacks on Turkish targets.

A photograph posted on twitter showed a man in a black suit holding a pistol, standing close to a podium in the gallery, its walls hung with pictures. Four people including what appeared to be the ambassador lay on the floor.