The abdomen is the most posterior of the three main body parts of a fly. It attaches anteriorly to the thorax. In female Tephritidae the distal segments are modified to form an ovipositor, of which the most basal part, the tubular or conical oviscape, is usually obvious.