On Jan. 10, a protester holding a sign “I am Charlie” was arrested in Moscow and later sentenced to eight days in jail. A few days later, the federal media watchdog ordered the St. Petersburg edition of the Business News Agency to remove the new cover of Charlie Hebdo from its website. The same agency was warned that reprinting the cartoon depicting the Prophet Muhammad could be considered a criminal offense, and that it would violate the “ethical and moral norms formed in Russia through the centuries of different peoples and faiths living side by side.”

On Monday, Ramzan A. Kadyrov, whom Vladimir V. Putin appointed president of Chechnya in 2007, held a mass rally in Grozny, the regional capital, against “the enemies of Islam.” It was reportedly attended by tens of thousands of people, many of them sporting slogans that read “We love Muhammad,” in Russian, Arabic and English. The largest banner quoted Mr. Putin: “Islam is a vital part of Russia’s cultural makeup.” In his speech, Mr. Kadyrov pledged to defend Russia and denounced Western journalists and politicians.

To a certain extent, the rally shows how adept — at least so far — Mr. Putin has been at mixing religion and politics. It is well known that he relies heavily on the Russian Orthodox Church to bolster his support whenever he needs to draw public attention away from his country’s troubling economic and social ills. But Russia also has a large Muslim population — nearly one-sixth of its people are Muslim. Moscow alone has two million Muslim residents, and according to some estimates, an equal number of Muslim migrant workers. Mr. Putin wants to keep them in his camp, and this requires pragmatism and the utmost delicacy. The brutal war in Chechnya may have ended, but Islamist rebels, some of them professing loyalty to the Islamic State, still roam the Caucasus, and Moscow is fearful that their influence can easily spread northward.

Though the Kremlin was quick to express solidarity with France and condemn terrorism in the aftermath of the Paris attack, the pro-government media placed equal blame at the feet of the Charlie Hebdo journalists for their provocative cartoons, and at the Western liberalism that allows such publications.