Thermal treatment leading to a different chemical state of a material