We report the growth of Mn-doped wurtzite GaN epilayers by nitrogen plasma-assisted molecular beam epitaxy, with a systematic attention to the dependence on the growth conditions. The addition of Mn modifies the growth diagram related to the Ga/N flux ratio. In particular, the stable Ga-bilayer coverage on the growth surface for the Ga-rich condition is destabilized in the presence of Mn. Mn incorporation in the epilayers is found to strongly depend on the Ga/N flux ratio: it varies by two orders of magnitude between the Ga-rich and the N-rich growth conditions. X-ray diffraction measurements on epilayers grown in the stoichiometric condition reveal a clear contrast between the precipitation of perovskite GaMn3N clusters at Mn compositions higher than 1.7%, and the single phase of wurtzite Ga1−xMnxN at lower Mn compositions.