External and internal structures of the thorax of the myrmecophile beetle Claviger testaceus (Clavigeritae, Pselaphinae) were examined and documented with state-of-the-art visualization techniques. Following a general trend in the omaliine lineage (Staphylinidae), the skeletal elements of the pro- and pterothorax in Claviger reach a maximum degree of compactness, with largely reduced inter- and intrasegmental sutures and skeletal elements linked with the flight apparatus. The musculature, especially metathoracic direct and indirect flight muscles, also shows a high degree of reduction. Two forms of wings were found among individuals of C. testaceus, both non-functional and representing an advanced stage of reduction. However, that wing vestiges are still present and the metanotum, only slightly reduced, suggests that loss of flight in this species is likely the result of a young evolutionary process. Several structures are linked with myrmecophilous habits: small body size facilitates transportation of beetles by ant workers and makes it easier to move inside nest tunnels; the remarkably compact body and mechanically robust appendages make the beetles less vulnerable to attacks by ant mandibles; the improved elytral interlocking mechanism and unusually expanded epipleura enhance the protection of vulnerable dorsal parts of the pterothorax and anterior abdomen; and glands associated with trichomes on the posterolateral elytral angle produce secretions attractive for ants. Various modifications of the thorax and anterior abdomen lead to an optimization of intimate associations with ants. The morphological syndrome enabling these beetles to cope with life in ant colonies evolved in several steps. This is suggested by an increasing solidification of the thoracic skeleton in related non-myrmecophilous groups and also by less modified related clavigerites;for instance, ant-associated tropical species are still able to fly.