Locking device, in particular for a head restraint for a vehicle seat, comprising a first sub-piece, which is displaceable from a use position along a displacement direction into a comfort position, a relative movement of a second sub-piece with respect to the first sub-piece and/or with respect to a third sub-piece about an axis of rotation substantially parallel to the displacement direction being provided, both a blocking device and a sliding device being arranged between the first sub-piece and the second sub-piece and/or between the second sub-piece and the third sub-piece, characterised in that the blocking device is provided for blocking a movement of the first sub-piece counter to the displacement direction, the blocking device comprising a toothing in the region of a first oblique face of the first sub-piece and a second oblique face of the second sub-piece and/or a toothing in the region of a third oblique face of the third sub-piece and a fourth oblique face of the second sub-piece, the blocking device comprising at least one blocking pin, the blocking pin being spring-biased in the normal situation, the blocking pin comprising teeth which can be positively inserted into the toothing, - merely the effect of the sliding device being provided in the state without force exertion on the first sub-piece by the user, the blocking pin being merely in frictional engagement with the fourth oblique face rather than in tooth engagement in the normal situation, the locking device comprising a spring, the spring being formed so as to bring about, by means of a transmission device, the relative movement to the effect of unlocking the blocking pin, a force threshold being provided, and the effect of the blocking device being provided when a first force above the force threshold and acting on the first sub-piece counter to the displacement direction is exerted, the toothings of the blocking device being blocked by tooth engagement in the event of a first force above the force threshold on the first sub-piece in a direction counter to the displacement direction, or - at least the effect of the blocking device being provided in the state without force exertion on the first sub-piece by the user, the locking device comprising a spring in such a way that a force threshold is provided and that, when a second force above the force threshold and acting on the first sub-piece parallel to the displacement direction is exerted, the effect of the blocking device is suspended, the blocking pin being actuated when a second force above the threshold and acting on the first sub-piece parallel to the displacement direction is exerted. - merely the effect of the sliding device being provided in the state without force exertion on the first sub-piece by the user, the blocking pin being merely in frictional engagement with the fourth oblique face rather than in tooth engagement in the normal situation, the locking device comprising a spring, the spring being formed so as to bring about, by means of a transmission device, the relative movement to the effect of unlocking the blocking pin, a force threshold being provided, and the effect of the blocking device being provided when a first force above the force threshold and acting on the first sub-piece counter to the displacement direction is exerted, the toothings of the blocking device being blocked by tooth engagement in the event of a first force above the force threshold on the first sub-piece in a direction counter to the displacement direction, or - at least the effect of the blocking device being provided in the state without force exertion on the first sub-piece by the user, the locking device comprising a spring in such a way that a force threshold is provided and that, when a second force above the force threshold and acting on the first sub-piece parallel to the displacement direction is exerted, the effect of the blocking device is suspended, the blocking pin being actuated when a second force above the threshold and acting on the first sub-piece parallel to the displacement direction is exerted.