Hydrostatic transmission for a work vehicle, the hydrostatic transmission comprising a hydraulic pump, a hydraulic motor, a forward line arranged to hydraulically connect an outlet of the hydraulic pump to an inlet of the hydraulic motor, and a backward line arranged to hydraulically connect an outlet of the hydraulic motor to an inlet of the hydraulic pump in such a manner to define a closed hydraulic circuit, wherein the hydraulic pump is arranged to be mechanically coupled to an internal combustion engine of the vehicle, and the hydraulic motor is arranged to be mechanically connected to driving wheels of the vehicle, wherein the hydraulic pump is an electronically-controlled variable displacement hydraulic pump, and the hydraulic motor is an electronically-controlled variable displacement hydraulic motor, wherein the hydrostatic transmission further comprises an electronic control unit for controlling the operation of the hydrostatic transmission, the electronic control unit being configured to generate drive currents (i d1, i d2, im) for adjusting the displacement of the hydraulic pump and of the hydraulic motor based on information, provided to the electronic control unit, relating to: - the position of an accelerator pedal of the vehicle, - the speed (v v) of the vehicle provided by a speed sensor; the hydrostatic transmission is characterized in that said information provided to the electronic control unit further comprises: - the pressure on the forward line of the hydrostatic transmission provided by a first pressure sensor, and - the pressure on the backward line of the hydrostatic transmission provided by a second pressure sensor; wherein the electronic control unit is programmed with a hill-holding function such that when the electronic control unit establishes that the accelerator pedal is released, but the vehicle is nevertheless moving downhill forward or backward based on the information received from said speed sensor and first and second pressure sensors (111, 112), the electronic control unit generates suitable drive currents (i d1, i d2, im) for controlling the hydraulic pump and the hydraulic motor and, thus, the driving wheels of the vehicle, in such a manner that the downhill movement is contrasted and/or prevented. wherein the hydraulic pump is an electronically-controlled variable displacement hydraulic pump, and the hydraulic motor is an electronically-controlled variable displacement hydraulic motor, wherein the hydrostatic transmission further comprises an electronic control unit for controlling the operation of the hydrostatic transmission, the electronic control unit being configured to generate drive currents (i d1, i d2, im) for adjusting the displacement of the hydraulic pump and of the hydraulic motor based on information, provided to the electronic control unit, relating to: - the position of an accelerator pedal of the vehicle, - the speed (v v) of the vehicle provided by a speed sensor; the hydrostatic transmission is characterized in that said information provided to the electronic control unit further comprises: - the pressure on the forward line of the hydrostatic transmission provided by a first pressure sensor, and - the pressure on the backward line of the hydrostatic transmission provided by a second pressure sensor; - the position of an accelerator pedal of the vehicle, - the speed (v v) of the vehicle provided by a speed sensor; the hydrostatic transmission is characterized in that said information provided to the electronic control unit further comprises: - the pressure on the forward line of the hydrostatic transmission provided by a first pressure sensor, and - the pressure on the backward line of the hydrostatic transmission provided by a second pressure sensor; wherein the electronic control unit is programmed with a hill-holding function such that when the electronic control unit establishes that the accelerator pedal is released, but the vehicle is nevertheless moving downhill forward or backward based on the information received from said speed sensor and first and second pressure sensors (111, 112), the electronic control unit generates suitable drive currents (i d1, i d2, im) for controlling the hydraulic pump and the hydraulic motor and, thus, the driving wheels of the vehicle, in such a manner that the downhill movement is contrasted and/or prevented.