Animals are known to exhibit different walking behaviors in hilly habitats. For instance, cats, rats, squirrels, tree frogs, desert iguana, stick insects and desert ants were observed to lower their body height when traversing slopes, whereas mound-dwelling iguanas and wood ants tend to maintain constant walking kinematics regardless of the slope. This paper aims to understand and classify these distinct behaviors into two different strategies against toppling for climbing animals by looking into two factors: (i) the torque of the center of gravity (CoG) with respect to the critical tipping axis, and (ii) the torque of the legs, which has the potential to counterbalance the CoG torque. Our comparative locomotion analysis on level locomotion and inclined locomotion exhibited that primarily only one of the proposed two strategies was chosen for each of our sample species, despite the fact that a combined strategy could have reduced the animal's risk of toppling over even more. We found that Cataglyphis desert ants (species Cataglyphis fortis) maintained their upright posture primarily through the adjustment of their CoG torque (geometric strategy), and Formica wood ants (species Formica rufa), controlled their posture primarily by exerting leg torques (adhesive strategy). We further provide hints that the geometric strategy employed by Cataglyphis could increase the risk of slipping on slopes as the leg-impulse substrate angle of Cataglyphis hindlegs was lower than that of Formica hindlegs. In contrast, the adhesion strategy employed by Formica front legs not only decreased the risk of toppling but also explained the steeper leg-impulse substrate angle of Formica hindlegs which should relate to more bending of the tarsal structures and therefore to more microscopic contact points, potentially reducing the risk of hindleg slipping.