Structural and electronic properties of Li 3GaP 2 and Li 3GaN 2 have been investigated by the first-principles calculations within the density functional theory. The calculated lattice parameters of the two compounds are in excellent agreement with the available experimental data. Both Li 3GaP 2 and Li 3GaN 2 are direct band gap semiconductors with the band gaps of 1.26 eV and 2.37 eV, respectively. The Ga-P (Ga-N) and Li-P bonds consist of a mixture of ionic character and covalent nature, while the Li-N bond exhibits almost ionic. The bonds in the Li 3GaP 2 are shown to have stronger covalency and weaker ionicity as compared to the corresponding ones in the Li 3GaN 2.