"The problem is – this is a scary neighbourhood," Marina, a resident of the Biryulyovo district in the south of Moscow, told me. "I don't think anyone feels safe here – and if you're going to analyse the situation, you have to start with that."

The situation Marina was referring to was the race riot that exploded in Biryulyovo last night. Residents clashed with law enforcers, cars were set on fire, people perceived as foreign were beaten up by groups of young men chanting nationalist slogans, windows were smashed and emergency police protocols were activated in the whole of Moscow.

Simmering ethnic tensions in Biryulyovo spun out of control when Yegor Shcherbakov, a young ethnic Russian, was fatally stabbed in front of his girlfriend last week. According to the girlfriend, the perpetrator – who residents say was from the North Caucasus region – had started harassing her in the street. Shcherbakov tried to intervene and was killed on the spot. Security camera footage obtained by the state-run NTV channel showed the purported killer grabbing another woman in the same place minutes before Shcherbakov was killed.

Like most of Moscow's working-class neighbourhoods, Biryulyovo is a place where many locals don't trust the police. There is little sense of community but nationalist sentiment brings people together – uniting them against a common enemy and giving them a sense of belonging.

Because working-class neighbourhoods are cheaper to live in, they also attract migrants. Most of these people, the majority of whom are making a meagre living at best, cannot live and work in Moscow legally. Complicated registration laws which were recently toughened, coupled with other bureaucratic hurdles, provide ample opportunity for corrupt law enforcement officials to receive bribes from the migrant population and ensure that they continue to live "outside the law". So an atmosphere of lawlessness is desirable for bribe-takers.

A few months ago, I witnessed another stabbing, this time of a migrant by another foreigner in a working-class neighbourhood in east Moscow. When the police called me in to give a statement, the officer on duty heavily implied that the situation with ethnic gangs in the neighbourhood was out of control – and it seems that the police can do little about it.

Russian nationalists, meanwhile, cleverly exploit the fear and loathing that exists in neighbourhoods such as Biryulyovo. In the face of what they say is police apathy and ineffectiveness, they remind locals that there is safety in numbers. By arguing that crime is mainly related to undocumented migration, they present a seemingly easy solution: get rid of foreigners. In the absence of coherent and effective policies on migration, Russian nationalists have emerged as the people with a can-do image among poor ethnic Russians in particular. The anger and resentment that is constantly bubbling just beneath the surface in places such as Biryulyovo then explodes as soon as the conditions are right.

In this atmosphere, it is the innocent migrants, who are just trying to go about their business, and people such as Shcherbakov, who just wanted to protect his girlfriend, who are paying the price for the failure to get crime and violence under control.