Assembly consisting of a passageway, delimited by side delimitations, for livestock, such as cattle, from a first space to a second space, wherein a oneway gate system, which can allow merely passage to the second space, is mounted in the passageway, wherein the gate system has at least one self- closing gate leaf which is movable between a closed position and one or more open positions, including a pass position wherein for an animal from the livestock passage to the second space is possible, wherein the gate leaf is arranged for movement to an open position by the exertion of pressure by an animal from the livestock passing through the passageway to the second space, wherein the assembly is also provided with means for determining an ID of an animal from the livestock, with means for blocking the gate leaf from moving into a pass position, which detainment means can be activated to a blocking position in response to data from the ID determining means.