Described is an electrochromic nanocomposite film comprising a solid matrix of an oxide based material, the solid matrix comprising a plurality of transparent conducting oxide (TCO) nanostructures dispersed in the solid matrix and a lithium salt dispersed in the solid matrix. Also described is a near infrared nanostructured electrochromic device having a functional layer comprising the electrochromic nanocomposite film.