The Jupiter-family comet 10P/Tempel 2 was observed during its 2010 return with the Herschel Space Observatory. We present here the observation of the J K (1 0 -0 0 ) transition of NH 3 at 572 GHz in this comet with the Heterodyne Instrument for the Far Infrared (HIFI) of Herschel. We also report on radio observations of other molecules (HCN, CH 3 OH, H 2 S and CS) obtained during the 1999 return of the comet with the CSO telescope and the JCMT, and during its 2010 return with the IRAM 30-m telescope. Molecular abundances relative to water are 0.09%, 1.8%, 0.4%, and 0.08% for HCN, CH 3 OH, H 2 S, and CS, respectively. An abundance of 0.5% for NH 3 is obtained, which is similar to the values measured in other comets. The hyperfine structure of the ammonia line is resolved for the first time in an astronomical source. Strong anisotropy in the outgassing is present in all observations from 1999 to 2010 and is modelled to derive the production rates.