MOSCOW, Russia — It was already pitch black when Vladimir Putin walked solemnly to the grave of Yegor Sviridov and tucked a bouquet of bright red carnations into the snow that lay covering it.

The red and white vista matched the flags that hung around the 28-year-old’s grave, marking Sviridov’s identity as a devoted fan of Spartak, one of Moscow’s premier soccer clubs.

The killing of Sviridov on Dec. 6 sparked the worst race riots Moscow has seen. Putin’s Tuesday night visit was, ostensibly, part of an attempt to subdue them. Yet what it did most was highlight the Kremlin’s dubious relationship with nationalism, one that many observers fear may well spin out of control.

“A young man was killed, Yegor Sviridov, and this is a big tragedy,” Putin said at a meeting with the head of several soccer fan clubs ahead of his visit to the grave. He stood to lead a minute of silence.

The move came more than two weeks after about 5,000 men occupied a square outside the Kremlin, facing off with riot police and ruthlessly beating passersby who looked like they were from central Asia or the Caucasus, Russia’s troubled southern region.

In the days that followed, crowds of youths took to the streets shouting “Russia for Russians,” organized, it seems, not by the ultranationalists who had called the first gathering but through social media sites and blogs. Attacks against foreigners and people from the Caucasus spiked. At least one Kyrgyz man was killed.

Through it all, Putin, Russia’s prime minister and its most powerful political force, remained silent. He first addressed the unrest on Dec. 16 during an annual televised question and answer program, in which he engaged in the sort of double-speak that continues to mark his comments on the issue.

“It is necessary to suppress any extremist actions, on all sides, regardless of their origin," Putin said in response to a question, before quickly moving on to issue a harsh warning to those who would question the way security forces responded.

“Russia was founded as a multi-ethnic and multiconfessional country,” he said, before adding: “Our religion is Orthodox Christianity.”

Later in the program, he made sure to note the resurgence of “Russian tradition,” equating it with Slavic convention. “Look what beautiful names our young people have,” he said, taking a question, “Yaroslavna, and now Miroslav. We are going back to the old Russian tradition.”

Putin has not once commented on the death of a migrant or minority, at least 86 of whom were killed in hate crimes last year, according to the Sova Center, an NGO that monitors ethnic violence.

During his 10 years in power, Putin has attempted to use nationalism to fill the ideological vacuum created by the Soviet Union’s dissolution. He has attempted to control it, namely through the creation of nationalist youth groups like Nashi and the Young Guard (who just added famed spy Anna Chapman as a member). Created in the wake of Western-leaning revolutions in Ukraine and Georgia, Nashi has become a force of thousands, able to be called upon whenever needed. The Kremlin has seen them as particularly useful in irritating “enemies,” be it picketing the Estonian embassy when relations get tough or harassing the British ambassador if that’s what is called for.

For some, like Yevgeny Valyaev, the head of ultranationalist group Russky Obraz, it’s not enough. “The government is also to blame” for the outbreak of unrest, Valyaev said, since the nationalists were forced to the streets to voice their anger. “They were not right not to take care of the national question. Sooner or later this would happen.”

Valyaev reserves his greatest hatred for people from the Caucasus — the dozen, mainly Muslim republics in Russia’s south. Though largely integrated into Russia through governance, culturally they remain a world apart. Two bloody wars fought between Moscow and separatists in Chechnya, as well as fallout from the wars that includes a spreading insurgency, have left lasting scars, both in the region and in Russia at large.

The cultural divide is something Putin acknowledged in his meeting on Tuesday. “Everyone has their own little motherland,” he said. “I wouldn’t give 10 kopeks for the health of someone who went to the north Caucasus republics and disrespected the Quran. Likewise, people from the north Caucasus, traveling to other areas, must respect the local culture.”

In June it was reported that the Moscow city government was planning to release a handbook detailing how non-ethnic Russians should behave when visiting or living in the capital. That included no national costumes and no slaughtering of sheep (done on Muslim holidays). In recent months, several men around Russia have been harassed or arrested for dancing the lezginka, a traditional Caucasian dance, outdoors.

“There are unwritten rules that residents of our city are obliged to follow, such as not slaughtering sheep in the backyard, not grilling meat on the balcony, not walking around the city in national attire, and speaking in Russian,” Mikhail Solomentsev, head of City Hall’s committee for interregional cooperation and national policy, told the official Rossiiskaya Gazeta in June. “Now we want to develop a code to speed up the integration of migrants who take up permanent residency in Moscow.”

Since the financial crisis broke out in late 2008, authorities have also moved to restrict migration to Moscow, by far the country’s richest city. Its new mayor, Sergei Sobyanin, himself from Siberia, has also said he plans to address the issue.

In the meeting Tuesday, Putin said the government should tighten up its migration policy, namely a Soviet-era rule that requires foreigners to register in a city if they are there for more than three days. Currently, the law is weakly enforced, becoming an issue only if a visitor is stopped by police.

In Moscow, the tension has subsided but not disappeared. On Wednesday night, police upped their patrols of suburban trains following rumors that that was the next place ultra-nationalists would strike. Valyaev, of Russky Obraz, predicted further violence on New Year’s Eve.

Amid all that, Moscow’s police chief came out Wednesday to say that non-Muscovites were to blame for 70 percent of all crimes committed in the city — a sentiment often echoed by residents.

“All these problems are more difficult to solve compared with a time when a much tougher registration system was in place," he said, echoing Putin’s comments on toughening migration rules.

Calling for national unity while singling out a part of the Russian population as “other” has become standard, creating or reinforcing fissures in Russia’s troubled society.

As Putin noted on Tuesday: “We used to have immunity against nationalism and xenophobia, but it looks as if this immunity is beginning to weaken.”