Résumé : We report the first in situ detection of halogens in a cometary coma, that of 67P/Churyumov- Gerasimenko. Neutral gas mass spectra collected by the European Space Agency's Rosetta spacecraft during four periods of interest from the first comet encounter up to perihelion indicate that the main halogen-bearing compounds are HF, HCl and HBr. The bulk elemental abundances relative to oxygen are~8.9×10-5 for F/O,~1.2×10-4 forCl/O and~2.5×10-6 for Br/O, for the volatile fraction of the comet. The cometary isotopic ratios for 37Cl/35Cl and 81Br/79Br match the Solar system values within the error margins. The observations point to an origin of the hydrogen halides in molecular cloud chemistry, with frozen hydrogen halides on dust grains, and a subsequent incorporation into comets as the cloud condensed and the Solar system formed.