Shallow slurry injection is considered to be the most efficient way to reduce the ammonia emission by agriculture, but its performance is highly dependent on the injection depth. An automatic electro-hydraulic depth control system was developed to maintain the injection depth within narrow margins around the desired value. it utilised the hydraulic system of the four-point linkage of the slurry tanker to change the position of the injector with respect to the tanker in order to minimise the difference between the desired height of the supporting frame of the injector and the height measured by means of an ultrasonic sensor. Based on a grey-box model, the performance of different control algorithms was compared by simulation with this model. Although the bandwidth of the system with a lead compensator was slightly larger than with a proportional controller for a linearised model structure, the performance of both controllers was comparable when actuator saturation was taken into account. Because of its simplicity, the proportional controller was implemented. Comparison of the performance of the depth control system with the commercially available pressure control system on two fields with a high and a low soil penetration resistance showed that the depth control system outperforms the pressure control system in terms of overall mean error (51-78% more accurate) and standard deviation (16-44% less variation) for all parallel runs. (C) 2007 IAgrE. Published by Elsevier Ltd. All rights reserved.