By Agence France-Presse
Speaking at a meeting with military officers in the Kremlin, Putin ordered the nation's security services to "act decisively" and "liquidate bandits on the spot" if armed militants put up resistance.
His spokesman Dmitry Peskov told reporters later that the Russian leader was referring to all those "who harbour plans to carry out acts of terror in our country."
On Wednesday evening, a homemade bomb placed in a locker at the supermarket in northwestern Saint Petersburg, Russia's second city and Putin's hometown, exploded.
"As you know, an act of terror took place in Saint Petersburg yesterday," Putin said at a ceremony to award officers who took part in the Syria campaign.
Those wounded in the attack included a 35-year-old pregnant woman.
Putin's 2015 decision to intervene in Syria militarily on the side of Bashar al-Assad has made Russia a priority target for the Islamic State group.
Anna Mityanina, vice governor of Saint Petersburg, said on Twitter that six people remain in hospital care.
The bomb came after the FSB security service said earlier this month it had prevented a terror attack on a key Orthodox cathedral in Saint Petersburg with the help of America's CIA, which led Putin to thank US President Donald Trump.
- Man in hooded jacket -
The explosion occurred at around 1845 local time (1545 GMT) as people geared up to celebrate the New Year -- the country's biggest holiday -- followed by Russian Orthodox Christmas, which falls on January 7.
Officials said the bomb had power equivalent to 200 grammes of TNT.
The investigation is being overseen by Russia's National Anti-Terror Committee even though authorities initially opened a probe into attempted murder.
The committee said the explosion went off after "a criminal placed an unidentified explosive device in a storage locker."
Footage posted online by local media showed a man -- who did not appear Slavic and wore a hooded jacket -- enter the supermarket with a backpack and leave without it a short time afterwards.
Saint Petersburg is home to tens of thousands of migrants many of whom come from majority-Muslim Central Asia.
Putin's spokesman Peskov rejected concerns that Saint Petersburg had become especially vulnerable in the face of terrorism.
- 'Fight continues' -
"Terrorism presents a danger to any populated locality in the world," he told reporters.
He added that Putin -- widely expected to extend his Kremlin term to 2024 in a March presidential election -- had every intention to "continue consistent and task-oriented work to fight terrorism."
"The fight is continuing," he added.
In April, a suicide bombing killed 15 people and wounded dozens on the Saint Petersburg metro.
That bombing was claimed by a group linked to Al-Qaeda which said it was a message to countries engaged in war with Muslims, a veiled reference to Russia's military campaign in Syria.
Earlier this month the FSB said it had arrested several members of the Islamic State group who had planned to blow up the Kazan Cathedral, one of Saint Petersburg's most famous landmarks, among other busy places.
Authorities have confiscated a large number of explosives used to make homemade bombs, automatic rifles, munitions and extremist literature.
FSB chief Alexander Bortnikov has said Russia remains on the alert for a possible return of jihadists from Syria ahead of the World Cup and the March presidential polls.
Earlier this month Bortnikov said that at least 4,500 Russians had left the country to fight with "terrorists" in the Middle East, North Africa and other regions.
Over the past 20 years Russia fought two wars with separatists in Chechnya. Russians also frequently became targets of suicide bombings and attacks by Islamist militants from the North Caucasus.