NOVELTY - Preparing a phosphate-containing lithium oxynitride or phosphorus and sulfur-containing lithium oxynitride solid electrolyte layer, comprises, e.g., providing at least one substrate, at least one reactive gas, at least an inert gas and a target, sputtering in an atmosphere comprising at least one reactive gas and at least one inert gas, and forming phosphate-containing lithium oxynitride or phosphorus and sulfur-containing lithium oxynitride solid electrolyte layer on the substrate. The target comprises a material having electrical conductivity.    USE - The solid electrolyte layer comprising phosphate-containing lithium oxynitride or (I) is useful in thin film battery, an electrochromic glass or an electrochromic film (claimed).    ADVANTAGE - The phosphate-containing lithium oxynitride or phosphorus and sulfur-containing lithium oxynitride solid electrolyte layer can be deposited as a thin layer of homogeneous thickness on the substrate, and the sputtering can be performed with a reduction of energy consumption.    DETAILED DESCRIPTION - Preparing a phosphate-containing lithium oxynitride or phosphorus and sulfur-containing lithium oxynitride solid electrolyte layer, comprises providing at least one substrate, at least one reactive gas, at least an inert gas and a target, sputtering in an atmosphere comprising at least one reactive gas and at least one inert gas, and forming phosphate-containing lithium oxynitride or phosphorus and sulfur-containing lithium oxynitride solid electrolyte layer on the substrate. The target comprises a material having electrical conductivity, and the material with electrical conductivity is transferred into an inert compound during sputtering. INDEPENDENT CLAIMS are also included for:    (1) phosphate-containing lithium oxynitride or phosphorus and sulfur-containing lithium oxynitride of formula (LiPxS(1-x)ON) (I) solid electrolyte layer produced by the above method; and    (2) a target for a sputtering method, comprising lithium, phosphate, oxygen, the material having electrical conductivity, and further nitrogen or sulfur.    x = less than 1.