  Theory predicts, and observations confirm, that the column density ratio of a
molecule containing D to its counterpart containing H can be used as an
evolutionary tracer in the low-mass star formation process. Since it remains
unclear if the high-mass star formation process is a scaled-up version of the
low-mass one, we investigated whether the relation between deuteration and
evolution can be applied to the high-mass regime. With the IRAM-30m telescope,
we observed rotational transitions of N2D+ and N2H+ and derived the deuterated
fraction in 27 cores within massive star-forming regions understood to
represent different evolutionary stages of the massive-star formation process.
Results. Our results clearly indicate that the abundance of N2D+ is higher at
the pre-stellar/cluster stage, then drops during the formation of the
protostellar object(s) as in the low-mass regime, remaining relatively constant
during the ultra-compact HII region phase. The objects with the highest
fractional abundance of N2D+ are starless cores with properties very similar to
typical pre-stellar cores of lower mass. The abundance of N2D+ is lower in
objects with higher gas temperatures as in the low-mass case but does not seem
to depend on gas turbulence. Our results indicate that the N2D+-to-N2H+ column
density ratio can be used as an evolutionary indicator in both low- and
high-mass star formation, and that the physical conditions influencing the
abundance of deuterated species likely evolve similarly during the processes
that lead to the formation of both low- and high-mass stars.
