Electrochemical and chemical synthesis of polyaniline (PAN) was performed in an aqueous acidic solution of aniline on the surface of vacuum deposited thin polyaniline films applied on an SnO 2 glass electrode. The composite films obtained have a high homogeneity and uniform thickness, essential for vacuum deposited layers. Spectroelectrochemical characteristics of the composite layers prepared by electrochemical synthesis are similar to those of electrodeposited PAN. Composite layers prepared by chemical synthesis have different spectroelectrochemical characteristics, probably due to the presence of by-products of chemical synthesis. High selectivity of the synthesis was observed on the covered areas of partly sputtered substrates, evidently due to the autocatalytic character of PAN synthesis.