There were no casualties, St Petersburg Governor Alexander Beglov wrote on Telegram.
The Mash news site said that the apartment building was hit by a Ukrainian drone.
It published videos appearing to show the moment the apartment building was struck, showing a strong flash of light engulfing one side of the building and fragments of debris flying into the air. Another video showed car alarms going off. The videos could not be immediately verified.
Russia’s Defence Ministry has not commented on the incident.