  We present multi-transition observations of PN towards a sample of nine
massive dense cores in different evolutionary stages. Using transitions with
different excitation conditions, we have found for the first time that the
excitation temperatures of PN are in the range 5-30 K. To investigate the main
chemical route for the PN formation (surface-chemistry vs. gas-phase
chemistry), and the dominant desorption mechanism (thermal vs. shock), we have
compared our results with those obtained from molecules tracing different
chemical and physical conditions (SiO, SO, CH3OH, and N2H+). We have found that
the PN line profiles are very well correlated with those of SiO and SO in six
out of the nine targets, which indicates that PN may be released by sputtering
of dust grains due to shocks. This finding is corroborated by a faint but
statistically significant positive trend between the PN abundance and those of
SiO and SO. However, in three objects the PN lines have no hints of high
velocity wings, which indicates an alternative origin of PN. Overall, our
results indicate that the origin of PN is not unique, as it can be formed in
protostellar shocks, but also in colder and more quiescent gas through
alternative pathways.
