We report on the growth of the compound semiconductor MgTe as weil as the ternary alloy Cd l ~xMg,Tc by mokcular hcam cpitaxy. This is to our knowkdgc thc first time that this material has heen grown by any epitaxial technique. Bulk MgTe, which is hygroscopic, has a band gap of 3.0 eV and crystallizcs usually in thc wurtzite structure. Pseudomorphic films were grown on zincblende Cd Te suhstrates for a MgTe thickness helow a critical layer thickncss of approximately 500 nm. In addition, Cdl_,MgxTe epilayers were grown with a Mg conccntration hetween 0 and 68'1(, wh ich corresponds to a band gap betwcen 1.5 and 2.5 eV at room temperature. The crystalline quality of thc layers is comparabk to CdTc thin films as long as they are fully strained. The lauice constant of zincblende MgTe is slightly smaller than that of CdTe, and the lattice mismatch is as low as O.7'k. In addition highly n-type CdMgTe layers were fabricatcd by hromine doping. The tunability of the band gap as weil as the ralher good laUice match with CdTc makes the matcrial interesting for optoelectronic device applications for the entire visible range.