“During questioning, the suspect confirmed having organised and carried out the crime,” the Russian Investigative Committee said in a statement.
“He said his act was motivated by a hatred of the organisers and members of the psychological centres he attended”.
The suspect also hid two USB drives that contained “information on the reasons which pushed him to commit the crime and a picture of the explosive device” near the scene of Wednesday’s attack.
The man had been registered at a psychiatric clinic since the age of 19, investigators said.
A court in St Petersburg on Sunday ordered him to be detained until February 28, according to Russian news agency Ria Novosti.
The suspect was named as 35-year-old Dmitry Lukyanenko, a resident of Saint Petersburg and member of the nationalist “New Age” movement by Russian news agency Interfax.
The man reportedly lived an anti-social life and had previously been convicted for drug possession.
Investigators have now labelled the crime an “act of terrorism” after first classifying it as “attempted murder”.
A pregnant women was among those injured in the blast, which the Islamic State group had earlier claimed responsibility for.
Saint Petersburg, Russia’s second city, and President Vladimir Putin’s hometown, was the scene of a deadly metro bombing in April and is set to host games during next year’s football World Cup, raising fears of similar attacks.
Putin’s 2015 decision to begin a military intervention in Syria’s conflict on the side of President Bashar al-Assad has made Russia a priority target for jihadist groups.
Download our app and read this and other great stories on the move. Available for Android and iOS.