On-line measurement of soil properties using the visible (Vis) and near infrared (NIR) spectroscopy is sensitive to soil-to-sensor distance (D) and angle (a) variations, which have prevented the successful development of on-line soil sensors so far. This study was undertaken to minimise these variations through optimising the three-point linkage of the tractor to improve the quality of soil spectra and the accuracy of plant available phosphorus (P-avl) measured with an on-line soil sensor. The sensor consisted of a tine, to the back of which an optical probe was attached to acquire soil spectra in diffuse reflectance mode from the bottomof the trench opened by the tine. A mobile, fibre-type, Vis–NIR spectrophotometer (Zeiss Corona 45 visnir fibre, Germany), with a measurement range of 306.5–1710.9 nm was used. Five lengths of the third point link (L) of the tractor of 545, 550, 555, 560 and 565 mm were selected to evaluate the quality of spectra collected on-line at 0.15 mtine depth. The on-linemeasured spectra were corrected to remove the effect of D and a. The correction was evaluated by estimating the accuracy of predicting P-avl using on-line measured spectra and a previously developed P-avl calibration model. Results showed that the best quality of spectra measured on-line was obtained for L of 555 mm, at which D and a vanished. This finding was supported by the maximum value of average maximum reflectance (AMR) of 75.7% obtained and by 100% successfully collected spectra. The worst quality of spectra was obtained at L of 545 mm, with the largest D of 6 mm and the largest a of 0.68. Values of L of 560 and 565 mm led to a decrease in the AMR (43.3 and 33.2%, respectively), while recording 100% successful spectra. Correction of on-line measured spectra led to clear improvements in the accuracy of on-line measured P-avl. A lower root mean square error (RMSE) of 1.07 mg 100 g1 and higher ratio of prediction deviations (RPD) of 1.42 were obtained with corrected spe