It was 2:40 p.m. on Monday, a lull before the evening rush hour in Russia’s second-largest city, St. Petersburg, where the subway normally carries two million people a day. The train had just entered a tunnel between stations, on its way out of a sprawling downtown hub, when the bomb exploded.
The homemade device, filled with shrapnel, tore through the third car. It killed 11 people; wounded more than 40, including children; and spread bloody mayhem as the train limped into the Technology Institute station with smoke filling the air.
Videos circulating on social media showed long red streaks across the white floor as the injured were dragged from the car. With the doors damaged, some people smashed windows to get out. “What a nightmare!” somebody yelled amid piercing screams.
With the attack, Russia once again appeared to have found itself a target of terrorism, shattering a respite in its main urban centers. Law enforcement agencies initially said they were seeking two people suspected of planting explosive devices, according to Russian news reports, but later indicated that the attack might have been carried out by a suicide bomber from a militant Islamic group.
There was no immediate claim of responsibility, but speculation turned toward militants from southern Russia, who fled the shoot-to-kill law enforcement policy in Chechnya and elsewhere in the Caucasus, joined the Islamic State by the thousands and have repeatedly threatened attacks. President Vladimir V. Putin sent the Russian military to Syria in September 2015 in order, he said then, to battle militants on their own turf before they could strike in Russia.
In a nod to that possibility — a potential political setback — Mr. Putin, who was in St. Petersburg for the day, emphasized that terrorists were the likely culprits, although he said investigators were exploring various possibilities. He laid flowers at the site of the explosion and went to the local security headquarters to be briefed on the investigation. The last major terrorist attack in a Russian city was in Volgograd in 2013.
“If somebody announces that it is related to the Russian invasion in Syria, it would be a sensitive scenario for Putin, because the Syria campaign would lose support inside Russia,” said Kirill Rogov, a political analyst, while adding that it was too early to connect the attack to Mr. Putin’s Syria policy with any certainty.
The dead and wounded had barely been evacuated before the factions in Russia’s heated political sphere began blaming one another.
Nationalists and others on the right pointed the finger at the opposition, saying such attacks emerged from the same womb as the street protests on March 26, in which tens of thousands of people marched against high-level government corruption. Opposition figures responded that the security forces, feeling vulnerable, were perfectly capable of provoking a crisis in order to expand their powers of search and seizure.
There were also unconfirmed reports that a suicide bomber from Uzbekistan or a neighboring country might have been responsible, unnerving St. Petersburg’s Central Asians.
“This will be a stain on us, as though we are criminals,” said Rafael Artikov, a 57-year-old Uzbek, standing in front of a makeshift memorial. “The goal was to frighten us and split us into separate groups,” he added, lamenting that “people look at me as though I am suspicious.”
There was some relief that the attack had not been worse. A larger bomb was found at a nearby station, Vosstaniya Square, but was disarmed, a spokesman for the National Anti-Terrorism Committee, Andrei Przhezdomsky, said on television. That bomb had been disguised as a fire extinguisher.
Security was increased in the Moscow Metro system and at major transportation facilities across Russia.
The health minister, Veronika Skvortsova, announced live on television that 10 people had died — seven in the subway system, one en route to a hospital and two while they were being admitted to an emergency room — and that 39 had been injured. Some of the wounded were children, she said.
Mr. Przhezdomsky appeared on television later with an update that 11 people were dead and 45 wounded.
Mikhail Syrovatsky, 20, wrote on VKontakte, a Russian social media network, that he had been ascending the escalator at the Technology Institute station when the blast occurred, followed by urgent calls to evacuate the station and the arrival of ambulances and a helicopter. “Left metro just in time,” he wrote.
Mr. Syrovatsky added later, “I was standing on the escalator when some kind of noise started coming from below, then I heard the noise of the coming train.”
People began to scream, he said, and an announcement ordered passengers to evacuate. “Very soon, you could detect the smell of burning, but I didn’t see any smoke,” he said. “I didn’t see what was going on the platform itself. I think everyone thought this was a fire.”
A St. Petersburg transit worker, speaking on the condition of anonymity because he was forbidden to comment to the news media, said the bomb exploded just after the train left the Sennaya Square station but was not powerful enough to derail it. The train limped to a stop at the Technology Institute station with smoke billowing, as passengers broke glass windows to escape and rescue workers smashed open the doors.
At the Dzhanelidze Hospital, a large Soviet block of concrete, arriving relatives were whisked into a special room away from the news media.
Valery Parfenov, the chief doctor, said at a news conference that many of the victims were dazed. He said six patients were in serious condition and four in very serious condition, including some with skull injuries that would require complex surgery. He held up a ball bearing to show the metal bits extracted from victims.
The subway system was shut down for about five hours, and the city declared surface transportation free. Still, as offices let out, the streets clogged with traffic, and sidewalks were jammed with people making the long trek home from work on foot.
“I appeal to you, citizens of St. Petersburg and guests of our city, to be alert, attentive and cautious, and to behave in a responsible manner in light of events,” Georgi S. Poltavchenko, the governor of St. Petersburg, said in a statement. He declared a three-day mourning period starting on Tuesday.
In a televised statement less than an hour after the explosion, Mr. Putin said he had spoken with the leaders of the special services, including the Federal Security Service, and with law enforcement officials, who he said would “do everything to find out the causes of what had happened.”
Speaking from the Konstantin Palace in the Strelna district of St. Petersburg, about 10 miles west of the blast, he added, “The government, both on the city and federal levels, will do everything to support families of the victims and injured.”
Mr. Putin was in St. Petersburg for a meeting with the president of Belarus — Alexander G. Lukashenko, a traditional ally who has recently feuded with the Kremlin — and to give a speech to the All-Russia People’s Front, a political group Mr. Putin started. At a joint appearance with Mr. Lukashenko to say they had resolved their differences, he did not mention the attack again.
In Washington, President Trump said the bombing was a “terrible thing” that was “happening all over the world.”
Over the years, most terrorist attacks against domestic targets in Russia have been the work of Islamic insurgents. The Islamic State claimed responsibility for a bomb that brought down a Russian airliner in Egypt in October 2015, killing all 224 people on board. Many victims were from St. Petersburg.
In December 2013, weeks before the start of the Winter Olympics in Sochi, twin bombings at a train station and on a bus in the southern city of Volgograd killed more than 30 people. And in January 2011, a suicide attack at Domodedovo International Airport near Moscow killed more than three dozen people.
The last fatal attack on a subway system in Russia occurred in March 2010, when explosions at two stations in central Moscow killed at least 33 people. Investigators blamed two suicide bombers from the Dagestan region for those attacks, and the leader of the Islamic insurgency in Chechnya, who has since been killed, claimed responsibility.
The subway system in Moscow was also struck twice in 2004. In February of that year, a bomb detonated inside a train car as it left the Avtozavodskaya station in southeastern Moscow, killing at least 39 people. That August, a suicide bomber detonated explosives at a station in northern Moscow, killing nine.
Mr. Putin, in deploying the Russian military to Syria, said the move was meant to take the fight to Islamic radicals. Once deployed, however, the Russians concentrated more on shoring up the government of President Bashar al-Assad than on attacking the Islamic State.
The Russian militants in Syria have periodically threatened reprisals in Russia. In a video posted on YouTube last July, a masked man driving across a desert landscape growled, “Listen, Putin, we will come to Russia and kill you at your homes.”
An earlier version of this article misstated the year in which twin bombings took place in the city of Volgograd. They occurred in 2013, not 2012.