During plasma electrolytic oxidation of a magnesium alloy (96% Mg, 3% Al, 1% Zn) we obtained a luminescence spectrum in the wave number range between 19 950 and 20 400 cm-1. The broad peak with clearly pronounced structure was assigned to the v’-v” = 0 sequence of the B 1Σ+ → X 1Σ+ electronic transition of MgO. Quantum-mechanical perturbative approach was applied to extract the form of the potential energy curves for the electronic states involved in the observed spectrum, from the positions of spectral bands. These potential curves, combined with the results of quantum-chemical calculations of the electric transition moment, were employed in subsequent variational calculations to obtain the Franck-Condon factors and transition moments for the vibrational transitions observed. Comparing the results of these calculations with the measured intensity distribution within the spectrum we derived relative population of the upper electronic state vibration levels. This enabled us to estimate the plasma temperature. Additionally, the temperature was determined by analysis of the recorded A 2Σ+ (v’ = 0) - X 2П (v” = 0) emission spectrum of OH. The composition of plasma containing magnesium, oxygen, and hydrogen under assumption of local thermal equilibrium was calculated in the temperature range up to 12 000 K and for pressures of 105, 106, 107, and 108 Pa, in order to explain the appearance of the observed spectral features and to contribute to elucidation of processes taking place during the electrolytic oxidation of Mg. [Projekat Ministarstva nauke Republike Srbije, br. 172040