A method for the synthesis of hollow lanthanide doped yttrium oxyfluoride (YOF) spheres in the micrometer size range with cubic structure based on the pyrolysis at 600ºC of liquid aerosols generated from aqueous solutions containing the corresponding rare earth chlorides and trifluoroacetic acid has been developed. This procedure, which has been used for the first time for the synthesis of YFO based materials, is simpler and advantageous when compared with other methods usually employed for the production of hollow spheres since it does not require the use of sacrificial templates. In addition, it is continuous, which is desirable because of practical reasons. The procedure is also suitable for doping the YOF spheres with europium cations resulting in down converting red phosphors when activated with UV light, or for co-doping with both Er