A Turkish court on Tuesday sentenced five men to life in jail for the 2016 murder of a Russian ambassador by a gunman who sought vengeance for Moscow's support of Syrian forces' destruction of Aleppo.

Russian ambassador Andrei Karlov was 62 when he was gunned down by 22-year-old Turkish police officer Mevlut Mert Altintas at a photo exhibition in Ankara.

The gunman shouted "Allahu akbar" (God is greatest) and "Don't forget Aleppo" in reference to the Syrian city that President Bashar al-Assad's forces obliterated with Russian backing at the height of the decade-long war.

Turkey and Russia remain on opposing sides in Syria but are still working closely together on trying to bring an end to the conflict.

Turkish President Recep Tayyip Erdogan at the time called Karlov's murder a "provocation especially aimed at disrupting the normalisation process of Turkey-Russia relations".

The Russian foreign ministry said it received news of the convictions with "satisfaction".

Russian President Vladimir Putin at Karlov's funeral
Russian President Vladimir Putin at Karlov's funeral Sputnik / Alexey NIKOLSKY

Turkish media reports said the suspects were convicted of aiding and abetting the gunman.

Six others were acquitted while seven were convicted of membership of an armed terrorist group in a trial that started in January 2019.

Turkey blamed the movement led by Fethullah Gulen -- a US-based Islamic preacher seen as Erdogan's arch-foe -- for the murder.

Prosecutors alleged that the movement sought to bring Turkey and Russia to the brink of a "hot war".

Ankara also accuses Gulen of orchestrating a failed coup to topple Erdogan in 2016 and refers to the movement as the Fethullah Terrorist Organisation (FETO).

Tensions over Syria dominated Ankara's relations with Moscow during Karlov's term as ambassador -- especially when Turkey shot down a Russian warplane near the Turkish-Syrian border in November 2015.

Russia slapped Turkey with a series of sanctions as a result.

But Erdogan apologised in 2016 for the incident and relations had begun to improve when Karlov was shot dead.

The Kremlin has treated Turkey's claim that Gulen's movement was responsible for the assassination with caution.

The Russian foreign ministry said Moscow "continues to believe that a large part of the responsibility for the crime is carried by certain groups that, on the eve of Karlov's murder, artificially whipped up negative sentiments in the media on social platforms about Russia and Syria."

The Russia ministry statement also praised "the Turkish justice system for decisively condemning this terrorist act".

Karlov's widow Marina Karlova said at the opening hearing of the trial that she believed the murder was aimed at hurting ties between Russia and Turkey.

Turkey's NTV television said Turkish intelligence agent Vehbi Kursad Akalin was given an aggravated life sentence after he "leaked information on Karlov to the (Gulen) movement".

Two other suspect were given two aggravated life sentences. These carry tougher terms of detention and replace the death penalty after it was abolished in 2004.

A total of 28 suspects -- including Gulen and eight other fugitives -- were originally put trial.

Tens of thousands of people have been arrested over alleged links to Gulen since 2016 and many more public sector workers have been sacked or suspended over such claims.