The West Indian fruit fly, Anastrepha obliqua (Macquart), infests a wide diversity of tropical fruit. Previous studies suggest that A. obliqua adults are attracted to volatile compounds common in different hosts. However, to date, most studies have used ripe fruit for the identification of attractive compounds. In this study, we investigated the attraction of sexually mature A. obliqua females and males to two cultivars and three ripening stages of guava. We also identified the attractive compounds to A. obliqua by combined gas chromatography-electroantennographic detector (GC-EAD) and gas chromatography-mass spectrometry (GC–MS) and evaluated the biological activity of the identified compounds in field-cage tests. We found that individuals of both sexes of A. obliqua showed no preference to the volatiles of either of the two cultivars of guava evaluated. In contrast, flies were more attracted to ripe and half-ripe fruit than to unripe ones. GC-EAD analyses of extracts of ripe “Creole” or “Thai” cultivars identified six compounds that elicited antennal responses by A. obliqua females and males. The compounds were identified by GC–MS as ethyl butyrate, cis-3-hexen-1-ol, ethyl hexanoate, cis-3-hexenyl acetate, ethyl benzoate, and ethyl octanoate. Half-ripe guava emit ethyl butyrate, cis-3-hexen-1-ol, ethyl hexanoate, and cis-3-hexenyl acetate, while only traces of cis-3-hexenyl-acetate were found in unripe guava. Field-cage tests with synthetic standards confirmed that the compounds identified are responsible for the attraction of A. obliqua flies to ripe guava.