The invention relates to a device for and method of milking dairy animals, in particular cows. The device and method have been improved in order to enhance the efficiency of use. In one embodiment, for the milking, teat cups (2,31,32,33) are connected by means of 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 means of a control unit (13) in dependence on a comparison value which is calculated on the bases of a milking parameter (gl-g4) representative of a milk flow from the respective teat and in dependence on a deactivation threshold. According to the invention, 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.