We present the first detection in space of phosphaethyne, the phosphorus analog of HCN. We have observed with the IRAM 30 m telescope four successive rotational transitions of HCP in the AGB star envelope IRC +10 216. After PN and CP, HCP is the third phosphorus-bearing molecule identified in the interstellar medium. HCP forms under thermochemical equilibrium in the surroundings of the stellar photosphere, from which it is expelled into space. It locks 3% of the phosphorus present in the expanding envelope, the remaining most likely being condensed on grains. We further discuss the chemistry of phosphorus in circumstellar envelopes in light of our findings and speculate on other phosphorus compounds that may be detectable.Based on observations carried out with the IRAM 30 m telescope. IRAM is supported by INSU/CNRS (France), MPG (Germany), and IGN (Spain).