Coatings of solid solutions of carbon or nitrogen in chromium or molybdenum were prepared by cathodic magnetron sputtering. Carbon or nitrogen was introduced either through the gas phase by reactive sputtering or by direct sputtering of sintered composite targets. Chemical and structural analyses of films revealed the formation of supersaturated solid solutions for carbon or nitrogen concentrations of up to several weight per cent. The nitrade and carbide phases predicted from the binary diagrams were not observed. The Cr-C and Mo-C coatings showed hardnesses of up to 2500 HV. The hardnesses of Mo-N and Cr-N reached 3000 HV. The wear and corrosion resistance of these coatings, which showed a dense structure, was superior to that of electrolytic hard chrome.