  Phosphorus is a crucial element in prebiotic chemistry, especially the P$-$O
bond, which is key for the formation of the backbone of the deoxyribonucleic
acid. So far, PO had only been detected towards the envelope of evolved stars,
and never towards star-forming regions. We report the first detection of PO
towards two massive star-forming regions, W51 e1/e2 and W3(OH), using data from
the IRAM 30m telescope. PN has also been detected towards the two regions. The
abundance ratio PO/PN is 1.8 and 3 for W51 and W3(OH), respectively. Our
chemical model indicates that the two molecules are chemically related and are
formed via gas-phase ion-molecule and neutral-neutral reactions during the cold
collapse. The molecules freeze out onto grains at the end of the collapse and
desorb during the warm-up phase once the temperature reaches $\sim$35 K. The
observed molecular abundances of 10$^{-10}$ are predicted by the model if a
relatively high initial abundance of phosphorus, 5$\times$10$^{-9}$, is
assumed.
