An automatic milking machine extracts milk from the teats of an animal by applying a milking vacuum to a respective teat receiving cavity (111, 112, 113, 114) each in which one of the teats is located during a milking session (TM). The milking session (TM) includes a boost phase (TBOOST) and is concluded by an exit phase (TEXIT). During the boost phase (TBOOST), the milking vacuum is applied at an elevated pressure level. During the exit phase, the milking vacuum is applied at one or more levels, each of which is lower than the elevated pressure level. The operation of the automatic milking machine transitions from the boost phase (TBOOST) to the exit phase (TEXIT) when (t2) a temporal criterion is fulfilled.