Russia, home to some 20 million Muslims, has fought two wars against Chechen separatists in the mainly-Muslim North Caucasus region where an insurgency is still simmering and some rebels have sworn their allegiance to Islamic State.
Unveiling the new mosque built of light stone, capped with turquoise and golden cupolas, Putin said Russia must educate its Muslim youth to prevent them from becoming extremists.
"This work is particularly important today as attempts are undertaken to exploit religious feelings for political purposes," Putin said during the opening of the mosque, which is said to cost some $170 million.
Read: One of Europe's biggest mosques to open in Moscow
"We see what's happening in the Middle East where terrorists of the so-called Islamic State discredit the great world religion, discredit Islam by sowing hate, killing people... destroying the world's cultural heritage in a barbaric way."
"Their ideology is built on lies, on open perversion of Islam. They are trying to recruit followers in our country as well."
Adopting Russian Orthodox Christian terminology for an important house of worship, the building is called the Moscow Cathedral Mosque. Its main golden dome and tall minaret reflected the style of many Orthodox churches, except for the Islamic crescents atop them.
Read: Moscow becoming Europe's largest Muslim city
Russia's Kremlin-backed Council of Muftis said private donations covered the construction of the mosque, including contributions from Kazakhstan and Turkey, whose President Tayyip Erdogan was present at the opening ceremony.
The new mosque, which can accommodate 10,000 people, was built on the site of an earlier mosque erected in the early 20th century by the Tatar community.
Islam is the second largest religion in Russia after Orthodox Christianity, making up around 15 percent of the population.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ