An assembly for managing a herd of animals moving about freely. The assembly is provided with an animal receiving area (2) surrounded by an enclosure (12). The enclosure is provided with a gate (10). A feeding device (7) is arranged in the surrounded area and has a feed measuring device for detecting whether an animal has eaten and for emitting an eating signal. An animal recognition system determines the identity of an animal and emits an animal recognition signal. A control unit (6) controls the functioning of the gate with the aid of the animal recognition signal. The control unit is suitable for opening the gate, in order that an animal can leave the surrounded area only when the eating signal indicates that the animal has eaten.