A device for and method of milking dairy animals, in particular cows includes teat cups that are connected by a robot arm to respective teats of the dairy animal. This makes it possible to start the milking of the teats of the dairy animal. A milk flow from the respective teat can be measured. The milking can be ended by a control unit in dependence on a comparison value which is calculated on the basis of a milking parameter representative of a milk flow from the respective teat and in dependence on a deactivation threshold. A second manner of calculating is used for calculating the comparison value of the last teat. The milking of the last teat can also depend on the moment of ending the milking of the one-but-last teat.