This work deals with the scattering of electromagnetic waves by a thin periodic layer made of an array of regularly spaced obstacles. The size of the obstacles and the spacing between two consecutive ones are of the same order δ, which is much smaller than the wavelength of the incident wave. We provide a complete description of the asymptotic behavior of the solution with respect to the small parameter δ: we use a method that combines matched asymptotic expansions and homogenization techniques. We pay particular attention to the construction of the near‐field terms. Indeed, they satisfy electrostatic problems posed in an infinite 3D strip, which require a careful analysis. Error estimates are carried out to justify the accuracy of our expansion. Copyright © 2014 John Wiley & Sons, Ltd.