In goats, αs1-casein polymorphism is related to different rates of protein synthesis. Two genetic variants, A and F, have been identified as strong and weak alleles based on a production of 3·5 and 0·45 g/l of αs1-casein per allele. The aim of the trial was to test whether goats can select their diet as a function of their genetic aptitude to produce milk at different casein levels and whether this selection can influence milk production or composition. Two groups of 8 animals, homozygous for strong (AA) or weak (FF) alleles were housed in individual pens. Using a manger subdivided into five separate containers, the goats were offered daily for 3 weeks: 1·5 kg of alfalfa pelleted hay, 0·7 kg of whole barley, 0·7 kg of whole maize, 0·7 kg of whole faba bean and 0·7 kg of pelleted sunflower cake. Total dry matter intake was similar between groups and resulted in nutrient inputs much higher than requirements. On average, goats selected 86% of maize plus barley and only 46% of faba bean plus sunflower. Indeed, AA goats selected less faba bean compared with FF goats (37·2 v. 56·7% of the available amount; P=0·01); during week 2 and week 3 they significantly increased maize selection (respectively for week 2 and week 3: 94·9 and 99·1% v. 85·3 and 87·3%) thus increasing the ratio between the high-energy feeds and the high-protein feeds (2·41 v. 1·81, P=0·023). As for true protein, the high soluble fraction (B1) and the indigestible fraction (C) were lower in the diet selected by AA goats (respectively in AA and FF groups: B1, 7·85 v. 9·23% CP, P<0·01; C, 6·07 v. 6·30% CP, P<0·001); these diet characteristics can be associated with lower losses of protein. Milk production, being similar in AA and FF groups when goats were fed with a mixed diet, significantly increased in AA group, when free-choice feeding was given (mean productions: 1198 v. 800 g/d, P<0·01). Casein content was higher in AA group than in FF group (2·70 v. 2·40%, P<0·01) whereas milk urea was higher in FF group (59·7 v. 48·8 mg/dl, P<0·01). In conclusion, when the animals were free to select their diet, their higher genetic aptitude to produce casein seemed to adjust their energy and protein dietary input in qualitative terms, thus leading to an increase in milk production and a decrease in milk urea. These results seem to demonstrate that interactions probably occurred between genetic polymorphism at the αs1-casein locus, diet selection and the efficiency of nutrient transformation into milk.