A specialized optical probe together with a spectrometer setup has been used to make spectrally resolved measurements from the spontaneous diesel flame emission in a Wärtsilä 6L46 production-line-type, six cylinder, medium speed diesel engine. The test engine has 460 mm cylinder bore and it was operated at 500 rpm and full power (5.8-6.8 MW). The fuels used in the experiments were standard light fuel oil, standard heavy fuel oil and low quality, high ash content heavy fuel oil. This paper reports the in-cylinder emission spectra as a function of crank angle for the different fuels in realistic engine operating conditions. The measurements were performed in the 400-900 nm wavelength range using 1 nm spectral resolution.The recorded spectra show, as expected, that the diesel flame radiation is dominated by the continuous, black body soot radiation. However, with the heavier fuel oil qualities strong spectral line features from, for example, fuel contained sodium and potassium were observed in the later phases of the combustion.The operation of the developed spectroscopic measurement system is described together with the construction and behavior of the in-cylinder quartz probe designed to withstand maximum cylinder pressures over 200 bars. The effect of the observed spectral emission lines respect to pyrometric flame temperature measurements is discussed.