Russian President Vladimir Putin signed into law Friday a bill toughening sentences for terrorist recruitment as the country deals with the issue of returning Islamist militants from Syria.
Official publication of the law came two days after a bomb attack on a supermarket in Saint Petersburg, Russia's second city, injured 14 people.
The new law, which parliament voted through on December 14 and the upper chamber approved on December 26, immediately raises the maximum sentence for terrorist recruitment and finance to life from 10 years.
Russia's military intervened in Syria in September 2015 to shore up the regime of President Bashar al-Assad and combat Islamist militants, making Russia a major target for such groups.
After Putin announced a partial troop withdrawal earlier this month, security services voiced fears of Islamist militants returning to Russia from Syria after the Islamic State group (IS) lost most of its self-proclaimed caliphate straddling Syria and Iraq.
Putin called Wednesday's blast in his home city of Saint Petersburg an "act of terror" and Thursday warned armed criminals they faced being "liquidated on the spot."
Russia's FSB security service said two weeks ago it had broken up an IS cell planning a December 16 terror attack at an Orthodox cathedral in Saint Petersburg, a key tourist attraction.
That attack was foiled with the help of America's CIA, which led Putin to thank US President Donald Trump.