An automatic milking system (11) includes i) a milking apparatus (12) with teat cups (15a-d) and milk flow rate measuring equipment (16a-d) for measuring the individual milk flow from each of the teats of the animal and ii) a teat-cup device (14) attaching the teat cups to the teats of the animal prior to milking the animal. The milk flow measuring equipment is arranged to measure the individual milk flow rate from each of the teats of the animal continuously during the milking of the animal. The teat-cup device (14) is operatively connected to the flow measuring equipment and is arranged, for each of the teats of the animal, to take off the teat cup from the teat of the animal depending on (i) the measured individual milk flow from the teat of the animal falling below a first threshold value (TV1) and (ii) the measured individual milk flow from each of the teats of the animal being below a second threshold value (TV2), whichever occurs first, wherein the second threshold value is higher than the first threshold value.