ST. PETERSBURG, Russia — The Russian security services disarmed an explosive device and detained eight people on Thursday in connection with a suicide attack on a metro train that killed 13 people on Monday.

The investigative committee, which is leading an inquiry into the bombing, said in a statement that six men were detained in St. Petersburg and two in Moscow. It said the explosive device, found in an apartment in St. Petersburg, was identical to the one the suicide bomber, Akbarzhon A. Dzhalilov, planted at the Vosstaniya Square station before he blew himself up between the Sennaya Square and the Technology Institute stations. The bomb at the Vosstaniya Square station was disarmed by a security officer before it could detonate.

Despite the arrests, it remains unclear whether Mr. Dzhalilov acted alone or as part of a wider network of militants.

The news added to an already tense atmosphere in St. Petersburg, the second-biggest city in Russia, which until Monday had been spared from any large-scale terrorist attacks.