System for feeding animals such as pigs, provided with a trough for containing food, a supply unit for supplying portions of food into the trough, identification means for identifying an animal that approaches the trough for eating food from the trough and a control unit connected to the supply unit and the identification means for controlling the supply unit in response to signals generated by the identification means wherein based on the determined identity of the animal the control unit determines the total amount of food which is to be supplied in the form of subsequent portions of food into the trough for feeding the animal, wherein the system is further provided with a sensor which is arranged such that it can be actuated by the animal while the animal is eating food from the trough and wherein the system is arranged such that the control unit will control the supply unit for supplying a next portion of food into the trough if at least the following conditions are met after that the previous portion of food was supplied into the trough: the same animal has been identified which was identified for supplying the previous portion of food into the trough and this animal has been actuating the sensor.