An animal hoof cleaning system comprising: an automatic milking station (1) configured to automatically milk an animal (2) therein, said automatic milking station (1) comprising a set of teat cups (3) that are configured to be attached to the teats of said animal during milking thereof, an automatic spraying device (4) configured to clean at least on hoof an animal housed in said automatic milking station (1) by spraying a fluid towards said at least one hoof of said animal, a control unit (5) configured to control the operation of the automatic spraying device (4), and detecting means (6-9, 10) configured to detect a milking state in which each teat of an animal housed in the milking station (1) is attached to a respective teat cup (3). The control unit (5) is configured to control the operation of the automatic spraying device (4) on basis of information from the detecting means (6-9, 10), and the control unit (5) is configured to activate the automatic spraying device (4) for spraying on said at least one hoof of said animal only when the detecting means (6-9, 10) has detected said milking state.