The city is still reeling from the bomb that ripped through the metro on Monday, killing 14 people.
A law enforcement source told Reuters fire engines had turned up at the building and people living in flats on two stairwells had been evacuated.
Interfax reported that authorities were verifying any links between the people detained on Thursday and the suicide bomber.
Separately, a homeless Russian man was injured on Thursday when a homemade device placed in a bag near a school exploded in the southern city of Rostov-on-Don, according to local media.
At about 6.30am (03:30 GMT), the man discovered a bag containing a torch. When he tried to switch it on, the torch exploded and tore off his hand, Tass quoted a local police officer as saying.
Several police vehicles were dispatched to the scene as well as security services.
More about: #St.Peterburg






