A method of feeding an animal in a feeding box. The method comprises at least the following steps, the steps a-c not necessarily taking place in the given sequence:a) identifying the animal in the feeding box,b) closing the feeding box, in such a way that access to the feeding box is impeded for an animal outside the feeding box,c) supplying feed to the animal in the feeding box in a chosen eating period of time.