A Polymerase Chain Reaction (PCR)- based assay developed for the specific identification of Thelazia gulosa, Thelazia rhodesi and Thelazia skrjabini (Nematoda, Spirurida), which cause bovine ocular thelaziosis, was evaluated for its usefulness in detecting the intermediate hosts and in estimating the infection prevalence of vectors in field conditions throughout 5 years (from 1997 to 2001). A total of 5190 flies were captured and identified as Musca larvipara, Musca osiris, Musca autumnalis, Musca tempestiva or Musca domestica. Genomic DNA was extracted from pools constituted by heads, thoraces, abdomens and wings of 10 flies of each species, and 2076 samples were subjected to a PCR assay to specifically detect the ribosomal ITS-1 sequence of bovine Thelazia. Amplicons were sequenced and subjected to digestion with CpoI restriction enzyme. M. autumnalis, M. larvipara, M. osiris and M. domestica species were shown to be PCR positive. T. gulosa was specifically detected by PCR in M. autumnalis, M. larvipara, M. osiris and M. domestica, whereas T. rhodesi is in M. autumnalis and M. larvipara. Of 27 positive samples, 23 were positive for T. gulosa and 4 for T. rhodesi, with a mean prevalence of 2·86% in the whole fly population collected. The highest mean prevalence values of infection were detected in M. autumnalis (4·46%) and M. larvipara (3·21%), and the former species was confirmed to be the vector of T. gulosa and T. rhodesi. This study is the first report of M. osiris as a vector of T. gulosa and M. larvipara as a vector of T. gulosa and T. rhodesi under natural conditions. The occurrence of Thelazia in fly populations in the Apulia region of Italy (in the 5 grazing seasons considered) indicates that cattle thelaziosis is enzootic in southern Italy. This molecular assay should be a useful epidemiological tool for assessing the role of different species of flies as intermediate hosts of thelaziae.