Description of the subject. Today, the dairy sector is facing economic, social and environmental challenges. Agroecology seems to be one way of meeting those challenges. However, dairy market demand in terms of volume and supply periods may not be in line with an agroecological transition. Breeders must respond to the production conditions fixed by dairies. Objectives. We analyzed to what extent dairy farming practices are changing in two agropastoral territories after a change in the dairy process or supply period, and whether changes in practices induce a stronger uptake of agroecological practices or, on the contrary, a shift towards more conventional intensification of those practices. We were thus able to see if and how these livestock farming system dynamics contribute to and fashion agroecological transition in dairy production, in response to changes in local contexts. Method. To highlight the evolution of breeders' practices, we interviewed 41 dairy ewe farmers in the South of France and dairy cattle farmers in Western Burkina Faso. We then proposed a normative approach to evaluate to what extent changes in practices corresponded to an agroecological transition. For that purpose, we proposed a grid to analyze local practices in combination with agroecological principles. We evaluated practices before and after changes to the supply period or the dairy market. Results. In each of the territories studied, four trajectories emerged, some of which were part of an agroecological transition. The results showed that the market plays an important role as a driver of transition, in particular in situations of organic production, or limited access to inputs. Other drivers, such as resource management schemes, lead to changes in practices on rangelands towards a reduced use of pastoral resources. Conclusions. In these highly contrasting contexts with different issues, such as food security and land accessibility, farmers bring into play practices according to agroecological principles that appear to respond to the local situation.