MOSCOW  Prime Minister Vladimir V. Putin appeared to offer support to soccer fans on Tuesday in a potentially explosive ethnic conflict with migrants from the North Caucasus region, most of them Muslims who have flooded the country’s major cities in search of work.

Mr. Putin held a formal meeting with representatives of soccer fan clubs, and paid his respects at the grave of a fan who was killed this month in a brawl with migrants from the North Caucasus.

The killing of the fan, Yegor Sviridov, 28, a supporter of the Spartak soccer team, has stoked deep frictions between the sides that the government has struggled to contain. Complicating matters, openly racist Slavic nationalists have allied with the soccer fan clubs, whose members have themselves sometimes used provocative slogans.

Mr. Putin’s visit to the grave  where he placed a bouquet of red roses  seemed to represent a highly symbolic effort to win the favor of the clubs.