We present deep optical spectra of the archetypal young planetary nebula ( PN ) NGC 7027 , covering a wavelength range from 3310 to 9160 Å . The observations were carried out by uniformly scanning a long slit across the entire nebular surface , thus yielding average optical spectra for the whole nebula . A total of 937 emission features are detected . The extensive line list presented here should prove valuable for future spectroscopic analyses of emission line nebulae . The optical data , together with the archival IUE and ISO spectra , are used to probe the temperature and density structures and to determine the elemental abundances from lines produced by different excitation mechanisms . Electron temperatures have been derived from the hydrogen recombination Balmer jump ( BJ ) , from ratios of He i optical recombination lines ( ORLs ) and from a variety of diagnostic ratios of collisionally excited lines ( CELs ) . Electron densities have been determined from the intensities of high-order H i Balmer lines and of He ii Pfund lines , as well as from a host of CEL diagnostic ratios . CEL and ORL diagnostics are found to yield compatible results . Adopting respectively electron temperatures of T _ { e } = 12 600 and 15 500 K for ions with ionization potentials lower or higher than 50 eV and a constant density of N _ { e } = 47 000 cm ^ { -3 } , elemental abundances have been determined from a large number of CELs and ORLs . The C ^ { 2 + } /H ^ { + } , N ^ { 2 + } /H ^ { + } , O ^ { 2 + } /H ^ { + } and Ne ^ { 2 + } /H ^ { + } ionic abundance ratios derived from ORLs are found to be only slightly higher than the corresponding CEL values . We conclude that whatever mechanism is causing the BJ/CEL temperature discrepanies and the ORL/CEL abundance discrepancies that have been observed in many PNe , it has an insignificant effect on this bright young compact PN . The properties of the central star are also discussed . Based on the integrated spectrum and using the energy-balance method , we have derived an effective temperature of 219 000 K for the ionizing star . Finally , we report the first detection in the spectrum of this bright young PN of Raman-scattered O vi features at 6830 and 7088 Å , pointing to the existence of abundant neutral hydrogen around the ionized regions .