Scattering of an obliquely incident plane wave by a general-shaped groove engraved on a perfectly conducting plane is rigorously solved. The scattered field is represented by a Fourier-integral representation. To analytically represent the fields in a general-shaped groove, the groove is divided into L number of layers. Fields are then expressed in each layer as summations of 2D spatial harmonic fields with unknown coefficients. Matching the boundary conditions between layers provides a linear set of equations connecting all the unknown harmonic coefficients. Judicious use of Fourier transform on the equations resulting from matching boundary conditions at the groove aperture provides a series representation of the scattered field in the spectral domain with unknown harmonic coefficients of the first layer in the groove. A stable solution is obtained by solving the complete system of equations with an adaptive choice fcr the number of modes in each layer. (C) 2007 Optical Society of America