On Friday, a video of the man wearing a white mask carrying a knife was uploaded to YouTube, a clip with more than 8.6 million views.
The video shows a masked man brandishing a knife in the centre of a crowded street in the Russian city of St. Petersburg.
A second video of a man in a similar costume wearing a mask wielding a pistol was uploaded earlier this week.
The masked man is believed to be a member of a local police force.
Russian President Vladimir Putin has condemned the attack, calling it an act of terror.
In an address to a joint session of parliament, he said the attacker acted “with malice towards civilians and soldiers”.
“It is a clear violation of international law,” he said.
“It’s an attack on human dignity and it is an act that is entirely unacceptable.”
In response to the video, Russia’s government said on Thursday that the masked man in the video had been detained for questioning.
It said the man had been a member, or sympathiser, of a criminal organisation.
Russia has seen numerous protests in recent years over perceived violations of rights.
The protests are often peaceful and sometimes have turned violent, with police responding with tear gas and water cannons.
The Russian Orthodox Church has denounced the video as “slander”.
Russian news agencies reported that the man in police uniform who was photographed carrying a gun was in custody.
The head of the Russian Orthodox church, Patriarch Kirill, said the masked gunman “has betrayed our faith”.
“The man who is carrying a weapon and who has a history of violence and extremism, has shown an evil spirit, he is not a member or sympathizer of any political group,” he told a news conference in St Petersburg.
“This man is not acting on his own.
This man is a traitor.”