A method for controlling the milking by a milking machine includes, during an initial phase of the milking, increasing a milking vacuum and/or a maximum pulsation vacuum for the milking gradually from a first selected vacuum level (1L) towards a second selected vacuum level (2L) to thereby improve teat stimulation and decreasing the risk of a second milk letdown. When a second milk letdown (2ML) is detected, the maximum pulsation vacuum is preferably immediately lowered to a third selected vacuum level (3L), and is kept at that third selected vacuum level until a certain milk flow has been established, whereupon the pulsation vacuum level is then again increased gradually until the second selected vacuum level is reached.