The aim of this study was to develop, perfect and validate the PCR (polymerase chain reaction) technique using mitochondrial (mt) and ribosomal (ITS-2) DNA for the accurate identification of Dicrocoelium dendriticum in molluscs and ants, the first and second intermediate hosts, and their early detection. The first primers that were designed amplified a 169 pb mtDNA fragment of D. dendriticum permitted the detection of a single D. dendriticum metacercaria from the Formica rufibarbis and Formica pratensis abdomen, as well as the detection of the brainworm in the head of the ants collected in tetania. Although these primers did not amplify Dicrocoelium chinensis DNA and permitted detected D. dendriticum in the molluscs, they did not discriminate Brachylaimidae metacercariae found in the same mollusc. The PCR that was designed to amplify a 93 bp fragment of the ITS-2 is D. dendriticum specific as it did not amplify D. chinensis, Brachylaimidae and other trematodes. This technique is very sensitive since it permitted the detection of D. dendriticum in the molluscs from the first day post-infection, the brainworm in the head of the ants and only 1 D. dendriticum metacercaria from the abdomen of the ants. Both techniques are important, mainly the latter.