We developed a three-dimensional, computational biomechanical model of a juvenile Nile crocodile (Crocodylus niloticus) pelvis and hindlimb, composed of 47 pelvic limb muscles, to investigate muscle function. We tested whether crocodiles, which are known to use a variety of limb postures during movement, use limb orientations (joint angles) that optimise the moment arms (leverages) or moment-generating capacities of their muscles during different limb postures ranging from a high walk to a sprawling motion. We also describe the three-dimensional (3D) kinematics of the crocodylian hindlimb during terrestrial locomotion across an instrumented walkway and a treadmill captured via X-ray Reconstruction of Moving Morphology (biplanar fluoroscopy; 'XROMM'). We reconstructed the 3D positions and orientations of each of the hindlimb bones and used dissection data for muscle lines of action to reconstruct a focal, subject-specific 3D musculoskeletal model. Motion data for different styles of walking (a high, crouched, bended and two types of sprawling motion) were fed into the 3D model to identify whether any joints adopted near-optimal poses for leverage across each of the behaviours. We found that (1) the hip adductors and knee extensors had their largest leverages during sprawling postures and (2) more erect postures typically involved greater peak moment arms about the hip (flexion-extension), knee (flexion) and metatarsophalangeal (flexion) joints. The results did not fully support the hypothesis that optimal poses are present during different locomotory behaviours because the peak capacities were not always reached around mid-stance phase. Furthermore, we obtained few clear trends for isometric moment-generating capacities. Therefore, perhaps peak muscular leverage in Nile crocodiles is instead reached either in early/late stance or possibly during swing phase or other locomotory behaviours that were not studied here, such as non-terrestrial movement. Alternatively, our findings could reflect a trade-off between having to execute different postures, meaning that hindlimb muscle leverage is not optimised for any singular posture or behaviour. Our model, however, provides a comprehensive set of 3D estimates of This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.