Abstract Spin injection into semiconductors has been a field of growing interest during recent years, because of the large possibilities in basic physics and for device applications that a controlled manipulation of the electrons spin would enable. However, it has proven very difficult to realize such a spin injector experimentally. Here we demonstrate electrical spin injection and detection in a GaAs/AlGaAs p-i-n diode using a semimagnetic II–VI semiconductor (Zn1−x−yBexMnySe) as a spin aligner. The degree of circular polarization of the electroluminescence from the diode is related to the spin polarization of the conduction electrons. Thus, it may be used as a detector for injected spin-polarized carriers. Our experimental results indicate a spin polarization of the injected electrons of up to 90% and are reproduced for several samples. The degree of optical polarization depends strongly on the Mn concentration and the thickness of the spin aligner. Electroluminescence from a reference sample without spin aligner as well as photoluminescence after unpolarized excitation in the spin aligner sample show only the intrinsic polarization in an external magnetic field due to the GaAs bandstructure. We can thus exclude side effects from Faraday effect or magnetic circular dichroism in the semimagnetic layer as the origin of the observed circularly polarized electroluminescence.