A milking method and system for preventing detachment of a teat cup from a teat of an animal during a milking process where the milking system includes a milk line connected to the teat cup, a vacuum system that applies at least two different vacuum levels to the teat cup, a measuring device configured to measure the air flow in the milk line during the milking process, and a control unit (5) that receives information about measured air flow values and to determine if the teat cup is about to be detached from the teat by comparing the measured air flow values (qa) with an acceptable value (qa, Δqa1/Δt), and when the measured air flow values are not acceptable, to control the vacuum system to apply a higher vacuum level to the teat cup than the present vacuum level.