Animals must continually adapt to varying locomotor demands when moving in their natural habitat. Despite the dynamic nature of locomotion, little is known about how multiple muscles, and different parts of a muscle, are functionally integrated as demand changes. In order to determine the extent to which synergist muscles are functionally heterogeneous, and whether this heterogeneity is altered with changes in demand, we examined the in vivo function of the lateral (LG) and medial (MG) gastrocnemius muscles of helmeted guinea fowl (Numida meleagris) during locomotion on different inclines (level and uphill at 14 degrees ) and at different speeds (0.5 and 2.0 m s(-1)). We also quantified function in the proximal (pMG) and distal (dMG) regions of the MG to examine the extent to which a single muscle is heterogeneous. We used electromyography, sonomicrometry and tendon force buckles to quantify activation, length change and force patterns of both muscles, respectively. We show that the LG and MG exhibited an increase in force and stress with a change in gait and an increase in locomotor speed, but not with changes in incline. While the LG and MG exhibited similar levels of stress when walking at 0.5 m s(-1), stress in the LG was 1.8 times greater than in the MG when running at 2.0 m s(-1). Fascicle shortening increased with an increase in speed on both inclines for the LG, but only on the level for the pMG. Positive work performed by the LG exceeded that of the pMG and dMG for all conditions, and this difference was magnified when locomotor speed increased. Within the MG, the pMG shortened more, and at a faster rate than the dMG, resulting in a greater amount of positive work performed by the pMG. Mean spike amplitude of the electromyogram (EMG) bursts increased for all muscle locations with an increase in speed, but changes with incline were more variable. The functional differences between the LG and MG are likely due to the different moments each exerts at the knee, as well as differences in motor unit recruitment. The differences within the MG are likely due to motor unit recruitment differences, but also differences in architecture. Fascicles within the dMG insert into an extensive aponeurosis, which results in a higher apparent dynamic stiffness relative to fascicles operating within the pMG. On the level surface, the greater compliance of the pMG leads to increased stretch of its fascicles at the onset of force, further enhancing force production. Our results demonstrate the capacity for functional diversity between and within muscle synergists, which occur with changes in gait, speed and grade.