Abstract Atomistic processes, involving chlorine, occurring at GaN(0 0 0 1) surface during hydride vapor-phase epitaxy (HVPE) growth, were modeled, using ab-initio quantum mechanical density functional theory (QM DFT) SIESTA code. The process of adsorption of hydrogen chloride (HCl) at the surface was simulated. Both Ga-rich and N-rich surface conditions were considered. For both cases it was assumed that hydrogen is abundant, which leads to H and NH 2 coverage for Ga-rich and N-rich state of the surface, respectively. By modeling a HCl molecule, approaching the surface, it was shown that two states exist: physisorbed at far distance, and chemisorbed at closer location. For both the cases, i.e. N-rich and Ga-rich, the physical adsorption is barrierless. The transition to chemically adsorbed state encounters an energy barrier that severely depends on the state of the GaN(0 0 0 1) surface. In the case of the Ga-rich surface, the barrier is relatively small, of the order of 0.2 eV. In the case of the N-rich surface, a high-energy barrier exists, close to 2 eV. At the final i.e. chemisorbed state, the molecule disintegrates, leaving chlorine atom strongly attached to the topmost Ga atoms; the hydrogen atom is detached and paired with the other hydrogen atom. The adsorption of HCl molecule approaching Ga–H radical, located on top of NH 2 coverage, occurs via physic to chemi-sorbed state. The transition to chemically adsorbed state requires surmounting the energy barrier of about 0.6 eV: free H 2 molecule is left and the Ga–Cl admolecule remains at the surface. As before, H coverage is ineffective in protection of gallium against HCl attack. The desorption of chlorine atom from the GaCl admolecule, attached at the GaN(0 0 0 1) surface, was also analyzed. Single Cl atom desorption encounters a high-energy barrier, of the order of 4.5 eV. The desorption of HCl, involving the additional H atom, needs to overcome a significantly lower-energy barrier, of the order of 0.6 eV, creating a possible path of chlorine removal from the surface.