A grazing-incidence configuration to achieve high spectral resolution in the extreme ultraviolet and soft x-ray regions is presented. It adopts a grating in the off-plane mount operated at high diffracted orders. Resolutions in the 10(5) range can be achieved in a relatively compact size. The monochromator can be tuned in a complete octave by using different diffracted orders without changing the geometrical parameters of the configuration. The optical design of the configuration and the application to a beamline for free-electron-laser radiation centered at 120 eV are discussed.