22 pages, Many stated preference studies have shown that individuals’ attitudes play an important role in explaining their behaviour and helping to disentangle preference heterogeneity. When responses to attitudinal questions are introduced into discrete choice models, a suitable approach that corrects for potential endogeneity must be adopted. We use a discrete choice experiment to analyse the preferences of residents regarding the use of agri-environmental practices in the peri-urban area of Milan (Italy). A detailed analysis of these preferences is relevant for policymakers as farmers on the peri-urban fringe are often asked to provide environmental services to urban-dwellers. We apply a latent class model that we extend to include indicators of individuals’ attitudes towards the relationship between agriculture and the environment. Besides the application of the control function approach to deal with endogeneity, our main contribution is the use of a refutability test to check the exogeneity of the instruments in the agri-environmental setting. Our results show that attitudinal indicators help to disentangle the preference heterogeneity and that the respondents’ willingness-to-pay distribution differs according to the indicators’ values.