Magnetic nanoparticles are provided that have a superparamagnetic core and a nanoporous silica shell surrounding the core. The shell is functionalized with amine or S-nitrosothiol groups both inside and outside the nanopores. A process to provide such nanoparticles involves hydrolyzing tetraethoxysilane (TEOS) in a microemulsion of a superparamagnetic nanoparticle to form a superparamagnetic nanoparticle encapsulated by an incompletely hydrolyzed nanoporous silica shell, and hydrolyzing an amine-containing compound or a thiol-containing compound in situ in the presence of the incompletely hydrolyzed nanoporous silica shell before hydrolysis and densification of the silica shell is complete to functionalize the nanoporous silica shell with amine or thiol groups both inside and outside the nanopores and to maintain nanoporosity of the shell. Such magnetic nanoparticles are useful as carriers for chemical or biological species, particularly for magnetic resonance imaging, optical imaging, targeted drug delivery, cell delivery and magnetic separation applications.