Adsorption of ammonia at NH 3 /NH 2 /H covered GaN(0001) surface was analyzed using results of ab initio calculations. The whole configuration space of partially NH 3 /NH 2 /H covered GaN(0001) surface was divided into zones differently pinned Fermi level: at Ga broken bond state for dominantly bare surface (region I), at VBM for NH 2 and H covered (region II), and at CBM for NH 3 covered surface (region III). The extensive ab intio calculations show validity of electron counting rule (ECR) for all mixed coverage, for bordering these three regions. The adsorption was analyzed using newly identified dependence of the adsorption energy on the charge transfer at the surface. For region I and II ammonia adsorb dissociatively, disintegrating into H adatom and HN 2 radical for large fraction of vacant sites while for high coverage the ammonia adsorption is molecular. The dissociative adsorption energy strongly depends on the Fermi level at the surface (pinned) and in the bulk (unpinned) while the molecular adsorption energy is determined by bonding to surface only, in accordance to the recently published theory. The molecular adsorption is determined by the energy of covalent bonding to the surface. Ammonia adsorption in region III (Fermi level pinned at CBM) leads to unstable configuration both molecular and dissociative which is explained by the fact that Ga-broken bond sites are doubly occupied by electrons. The adsorbing ammonia brings 8 electrons to the surface, necessitating transfer of the electrons from Ga-broken bond state to Fermi level, energetically costly process.Adsorption of ammonia at H-covered site leads to creation of NH 2 radical at the surface and escape of H 2 molecule. The process energy is close to 0.12 eV, thus not large, but the inverse process is not possible due to escape of the hydrogen molecule.