The present invention relates to a system (10) for automatic adjustment of atleast one interior dimension of a milking location (12) for an animal. The milkinglocation (12) comprises an enclosure formed by e.g. four confining means (12,..,,12), whereby at least one of the confining means (12,...,12) is movable. The system (10) comprises a first sensor means (14)operable to detect the presence of an animal In the milking location (12). Thesystem (10) also comprises a control means (18) connected to the first sensormeans (14), When an animal is detected in the milking location (12), the controlmeans (18) is operable to move the at least one movable confining means (12,..,,12) stepwise, in order to adjust the at least one interior dimensionof the milking location (12) to the animal.