Rio de Janeiro's homicide branch said the vice consul "reacted to an attempted assault."
"The vice consul got into a physical struggle with the assailant and during the fight the aggressor's weapon fired shots. The assailant died of his wounds on the spot."
The Russian embassy in the capital Brasilia issued a statement saying that "no representative of the Russian consulate general in Rio de Janeiro was involved in an attempted assault ending with the death of the suspect."
According to Rio's police, the fight took place in the western zone of Rio where the Olympic Park and athletes' village are located. It was the latest high profile incident reported in a city where 85,000 police and soldiers have been deployed to keep the peace during the Games.
Also Read
Brazilian news site Extra reported that the man identified as the vice consul was a native of Rio and an expert in jiu-jitsu, a popular martial art in Brazil that specializes in self-defense.
Traffic jams are a favored target for robbers on foot or on motorbikes in Rio, as well as buses which are regularly raided by armed men.