Fopius arisanus is a solitary egg–pupal endoparasitoid that attacks several species of tephritid fruit flies, particularly Bactrocera spp. This species, indigenous from the Indo-Australian region, was introduced into Mexico for biological control purposes. From the standpoint of the ‘new associations’ concept this parasitoid has been evaluated against fruit flies in the Anastrepha complex. We investigated the specificity of F. arisanus responses to fruits infested with two species of Anastrepha. We examined whether fruit volatiles attractive to this parasitoid are induced as a result of fruit fly oviposition. We also investigated whether F. arisanus females are able to discriminate between the oviposition-induced volatiles from host eggs parasitised by conspecifics and volatiles from unparasitised eggs. All experiments were performed in a wind tunnel. Results showed that mango fruits infested with A. ludens eggs (2–3 days after egg deposition) were significantly more attractive to naïve F. arisanus females compared with non-infested fruits or fruits infested with larvae. In addition, guava fruits harbouring A. striata eggs were significantly more attractive to the parasitoid than non-infested fruits or fruits infested with larvae. Thus, the parasitoid was attracted to fruits with eggs, but fruit and fly species did not influence the parasitoid attraction. We also found that F. arisanus females were more attracted to fruits exposed to fertile A. ludens females (i.e. fruits with eggs inside) compared with fruits exposed to sterile females (i.e. fruits with no eggs inside) or fruits with mechanical damage. Parasitoid females were not attracted to A. ludens eggs. The results suggest that the presence of eggs induces volatiles that attract parasitoids. Finally, we found that F. arisanus was able to discriminate between fruits with unparasitised eggs vs. eggs parasitised by conspecifics, indicating that host discrimination could be mediated by olfactory cues.