Security sources say the gunman who shot the Russian ambassador to Turkey in a fatal attack at an art gallery was an off-duty police officer who worked in the Turkish capital, according to media reports.