Simultaneous time-resolved SAXS and XANES techniques were employed to follow in situ the formation of Pd nanoparticles in a porous polystyrene support, using palladium acetate as precursor and gaseous H2 or CO as reducing agents. These results, in conjunction with data obtained by DR UV-Vis and DRIFT spectroscopy and TEM measurements, allowed to unravel the different role played by gaseous H2 and CO in the formation of the Pd nanoparticles. In particular, it was found that the reducing agent affects: i) the reduction rate (which is faster in presence of CO); ii) the properties of the hosted nanoparticles, in terms of size (bigger with CO), morphology (spherical with H2, triangular-like with CO) and surface properties (unclean with CO). The importance of a multi-technique approach in following the whole process of metal nanoparticles formation clearly emerges