A leg prosthesis, including an inner tube having a longitudinal axis a and an outer tube which is mounted on the inner tube and can be displaced relative to the inner tube in the axial direction relative to the longitudinal axis a, a retaining device being provided, by means of which the inner tube and the outer tube can be positively secured relative to one another in the axial direction relative to the longitudinal axis a in at least one position L. The retaining device includes an operating element which can be manipulated by the prosthesis wearer and by which the retaining device can be detached such that, proceeding from the position L, the inner tube can be continuously displaced in the axial direction relative to the longitudinal axis a relative to the outer tube into at least one position K, whereby the leg prosthesis can be shortened and, by the application of a force F which acts on the inner tube and/or on the outer tube and acts in the axial direction, the inner tube can be displaced, starting from the position K, in the axiai direction relative to the longitudinal axis a relative to the outer tube, whereby the leg prosthesis can be continuously extended, it being possible for the inner tube and the outer tube to be automatically secured in the axial direction relative to the longitudinal axis a only in the position L by the retaining device.