Russia's intelligence agency says the men detained on Sunday in a suspected terrorist plot were Russians who had been trained by the Islamic State group in Syria.

The FSB agency in a statement released on Monday did not say how many people were detained, but said two said they had been trained by Islamic State militants and were plotting a terrorist attack on Moscow's public transport. The FSB says the men had arrived in Moscow "well before" Russia began carrying out airstrikes in Syria.

Russia's counterterrorism agency on Sunday raided a Moscow apartment and arrested several people who allegedly were preparing to carry out an attack in the capital.

The FSB said an improvised explosive device with five kilos (11 pounds) of unidentified explosives was found in the apartment.