We present multi-component photoionization models allowing for local density inhomogeneities in the NLR to interpret the emission line spectra of Seyfert 2 galaxies. This approach leads to a successful match of a large set of line intensities from the UV to the NIR. In particular, the hitherto elusive NIR features [SIII]lambda 9062 + lambda 9531 as well as high-ionization lines like [FeVII]lambda 6087 are consistently fitted. The predictions of CIII]lambda 1909 and CIV lambda 1549 are considerably improved. From the detailed analysis of single-component photoionization models we derive the minimal radial extent of the NLR and the necessary span in density. Furthermore, we determine constraints on suggestions made about the role of matter-bounded clouds, and on proposed explanations for large [OIII]lambda 4363/lambda 5007 ratios (the so-called 'temperature problem'), and assess the usability of some emission-line ratios as indicators of the ionization parameter. We find that a systematic variation of the cloud column densities in a population of matter-bounded clouds is inconsistent with the trends and correlations exhibited by the emission lines in the diagnostic diagrams. Concerning the temperature problem, the only possibility that leads to an overall consistency with the strengths of all other observed emission lines is subsolar metal abundances (as compared to e.g. the presence of dust, the existence of a high-density component, or matter-bounded clouds). In addition, the consequences of the presence of (Galactic-ISM-like) dust internal to the clouds were investigated. These models alleviate the [OIII]-ratio problem but did not lead to overall consistent fits. The most conspicuous fallacy lies in the extreme underprediction of Fe-lines, which is mainly due to the strong depletion of the Fe abundance. In our final model series, the NLR is composed of a mixture of metal-depleted (similar to 0.5 x solar) clouds with a radius-independent range in densities (10(2) to 10(5) cm(-3)) distributed over a range of distances from the nucleus (galactocentric radii from at least similar to 10(20) cm to 10(21).(5) cm, for Q(tot) = 10(54) s(-1)). In order to encompass the observed range of each line intensity relative to H beta, it turns out to be necessary to vary the spectral energy distribution incident on the clouds, qualitatively confirming the findings of Ho et al. (1993). We found a successful continuum sequence by adding an increasing contribution of a hot black body (T approximate to 200 000 K) to a steep powerlaw (alpha(UV-X) approximate to -2). These continua imply that low and high-excitation objects differ in the strength but not in the basic shape of the EUV bump.