The 23-year-old student said his assailants had beaten him up, but had not stolen any of his possessions.
The man, reportedly attacked late at night, sustained some bodily injuries, but refused medical attention, police said.
The incident is the latest in a string of violent attacks on foreigners in Russia in recent years.
The central city of Voronezh alone has seen at least seven apparently racially motivated killings over the past six years, including the murder of a Peruvian student in October last year.
St. Petersburg has also witnessed a series of attacks on non-whites recently. A man from Mali was stabbed to death here in February, following the murder of a student from Cameroon last December and of a Congolese student in September.
Reports of routine attacks by skinheads and violent youths on foreigners with non-Slavic features have prompted Russian and foreign human-rights groups to raise concerns over the alarming spread of racist and xenophobic attitudes in the country.