A vector integral–differential equation to describe electromagnetic wave propagation in nanowaveguides and photonic crystals containing thin metal layers is developed. Exact solution of the equation is obtained with the Galerkin method, taking into account the complex dielectric permittivity of meta