A limiting device (9) for limiting the freedom of movement of a standing cow in a lying box (1) in a loose house for keeping cattle, in a direction towards a front end (8) of the lying box. The limiting device (9) is intended to be placed near the front end, on and projecting from the bottom (11) of the lying box. At least one top part (13) of the limiting device is movable between a limiting position operatively projecting from the bottom for limiting the freedom of movement of the standing cow towards the front end of the lying box, and a releasing position, for leaving, for the purpose of the front legs of the cow lying down, at least a part of the space the limiting device occupies in the limiting position. A lying box and a loose house with such limiting device are also described.