Abstract. An algorithm setup for the operational Aerosol Layer Height product for TROPOMI on the Sentinel-5 Precursor mission is described and discussed, applied to GOME-2A data, and evaluated with lidar measurements. The algorithm makes a spectral fit of reflectance at the O 2 A band in the near-infrared and the fit window runs from 758 to 770 nm. The aerosol profile is parameterised by a scattering layer with constant aerosol volume extinction coefficient and aerosol single scattering albedo and with a fixed pressure thickness. The algorithm's target parameter is the height of this layer. In this paper, we apply the algorithm to observations from GOME-2A in a number of systematic and extensive case studies, and we compare retrieved aerosol layer heights with lidar measurements. Aerosol scenes cover various aerosol types, both elevated and boundary layer aerosols, and land and sea surfaces. The aerosol optical thicknesses for these scenes are relatively moderate. Retrieval experiments with GOME-2A spectra are used to investigate various sensitivities, in which particular attention is given to the role of the surface albedo.From retrieval simulations with the single-layer model, we learn that the surface albedo should be a fit parameter when retrieving aerosol layer height from the O 2 A band. Current uncertainties in surface albedo climatologies cause biases and non-convergences when the surface albedo is fixed in the retrieval. Biases disappear and convergence improves when the surface albedo is fitted, while precision of retrieved aerosol layer pressure is still largely within requirement levels. Moreover, we show that fitting the surface albedo helps to ameliorate biases in retrieved aerosol layer height when the assumed aerosol model is inaccurate. Subsequent retrievals with GOME-2A spectra confirm that convergence is better when the surface albedo is retrieved simultaneously with aerosol parameters. However, retrieved aerosol layer pressures are systematically low (i.e., layer high in the atmosphere) to the extent that retrieved values no longer realistically represent actual extinction profiles. When the surface albedo is fixed in retrievals with GOME-2A spectra, convergence deteriorates as expected, but retrieved aerosol layer pressures become much higher (i.e., layer lower in atmosphere). The comparison with lidar measurements indicates that retrieved aerosol layer heights are indeed representative of the underlying profile in that case. Finally, subsequent retrieval simulations with two-layer aerosol profiles show that a model error in the assumed profile (two layers in the simulation but only one in the retrieval) is partly absorbed by the surface albedo when this parameter is fitted. This is expected in view of the correlations between errors in fit parameters and the effect is relatively small for elevated layers (less than 100 hPa). If one of the scattering layers is near the surface (boundary layer aerosols), the effect becomes surprisingly large, in such a way that the retrieved height of the sin...