Abstract Stark widths ( W) and shifts ( d) of the astrophysically very important singly ionized magnesium (Mg II) resonance h and k (279.5528 and 280.2705 nm) spectral lines in the 3s–3p transition have been measured at a 26,000 K electron temperature and 1.1 × 10 23 m −3 electron density in helium–oxygen plasma created in an optically thin linear, low-pressure, pulsed arc discharge. The magnesium atoms, as impurities in the driving gas, have been introduced by erosion from the pure magnesium bands fixed on the discharge electrodes providing conditions free of the self-absorption in the resonance h and k lines. Besides, the W and d values of the 279.0777 nm and 279.7998 nm Mg II lines in the 3p–3d transition have also been measured. Our W and d have been compared to the existing experimental and theoretical data. Good agreement was found with the results calculated by the semiclassical perturbation formalism, especially in the case of the Stark widths.