The central requirement for legged locomotion is the simultaneous control of propulsion, clearance above ground and balance of the body frame. Apart from solving this multiple control problem, the neural controller needs to be adaptive in order to account for varying physical conditions of the environment, such as slope and compliance of the substrate, but also for changes in behavioural context of the animal. For example: whereas control of a light, running insect with low clearance may well entirely rely on centrally generated rhythms and inherent viscoelastic properties of the musculoskeletal system known as 'preflexes' (Jindrich and All animals capable of legged locomotion execute fast, adaptive compensatory movements in response to perturbation of a step cycle. In terms of motor control, such adaptive behaviour typically involves changes in the kinematics of the perturbed limb as well as changes in coordination between legs. Moreover, the unpredictable variety of real life situations implies that compensatory responses should be sensitive to the behavioural context of the animal. We have investigated the extent to which the compensatory response of a walking stick insect (Carausius morosus) adapts in parallel to strong contextdependent adaptation of step kinematics and inter-leg coordination. The behavioural contexts we chose were straight walking and visually induced curve walking, for both of which the steady state limb kinematics and interleg coupling strengths were known. In case of curve walking, we further distinguished contexts according to whether the inner or the outer leg was perturbed. The three contexts differed strongly with respect to the set of joint actions before perturbation. Upon mechanical perturbation of front leg protraction, we studied contextdependent differences in a local avoidance reflex of the perturbed leg, as well as in coordination mechanisms that couple the step cycles of the perturbed leg to its unperturbed neighbours.In all three walking contexts, obstacle contact caused an avoidance movement of the front leg that deviated from the unperturbed swing trajectory. Swing duration was increased while step distance was decreased; however, both effects vanished in the subsequent unperturbed step. The prevailing immediate reaction of the three leg joints were retraction of the coxa (>76%), levation of the femur (>80%), and flexion of the tibia (>80%), regardless of the behavioural context and, therefore, joint action prior to perturbation. Moreover, activation of each one of these joint actions was shown to be independent of the other two. Thus, local avoidance reflexes are not modulated by the descending visual information that causes transition from straight to curve walking, but are composed of context-independent joint actions.Perturbation of the front leg also caused significant shifts of the touch-down position of the perturbed leg and of its unperturbed neighbours. If the inner front leg was perturbed, this shift could persist until the subsequent step. Perturbation affected...