It has been recognized that one of the most difficult steps in intramedullary nailing of femoral shaft fractures is the distal locking--the insertion of distal transverse interlocking screws, for which it is necessary to know the positions and orientations of the distal locking holes (DLHs) of the intramedullary nail (IMN). This paper presents a robust and accurate approach for solving this problem based on two calibrated and registered fluoroscopic images. The problem is formulated as a two-stage model-based optimal fitting process. The first stage, nail detection, automatically estimates the axis of the distal part of the IMN (DP-IMN) by iteratively fitting a cylindrical model to the images. The second stage, pose recovery, resolves the translations and the rotations of the DLHs around the estimated axis by iteratively fitting the geometrical models of the DLHs to the images. An iterative best matched projection point (IBMPP) algorithm is combined with random sample strategies to effectively and robustly solve the fitting problems in both stages. We designed and conducted comprehensive experiments to validate the robustness and the accuracy of the present approach. Our in vitro experiments show on average less than 14 s execution time on a Linux machine, a mean angular error of 0.48[degrees] (std = 0.21[degrees]), and a mean translational error of 0.09 mm (std = 0.04 mm). We conclude that the present approach is fast, robust, and accurate for distal locking applications. Index Terms--Evolutionary algorithm, fluoroscopy, hybrid optimization, intramedullary nailing, pose estimation.