A farrowing system comprising: a farrowing pen adapted to receive a sow; afeed dispenseradapted to dispense feed to the sow received in the farrowing pen according toa first feedingpattern; at least one heating element providing heat to a portion of thefarrowing pen; a birthdetection sensor for detecting a birth of a piglet from the sow; and acontroller operativelyconnected to the birth sensor, to the feed dispenser and to the at least oneheating element forswitching from the first feeding pattern to a second feeding pattern and foractivating the atleast one heating element upon detection of the birth. There is also provideda method foroperating a farrowing system and a method for dispensing feed to a farrowingsow.