The distribution and abundance of insect pests are influenced by landscape structure and composition, particularly through modifications to biocontrol services and the proportion of suitable habitats within the landscape. In addition, pest populations are affected by agricultural practices at different landscape scales, ranging from field-by-field to area-wide. Our study focuses on one of the world’s most invasive and polyphagous pests of fruits and vegetables: the Oriental fruit fly, Bactrocera dorsalis (Hendel, 1912) (Diptera: Tephritidae). We analysed how farmer practices, landscape composition, and mango varieties were related to B. dorsalis infestation in an insular tropical agroecosystem with disparate farming systems, where crop plots are of modest size and interconnected with various habitat types. Fruit infestations were regularly recorded during 18 months in different plots on all mango varieties of the study area. Agricultural practices were determined through semi-structured interviews and categorised according to the farm structure and practices related to B. dorsalis management. Landscape composition was determined from high-resolution satellite imagery and local surveys, and the area of landscape cover was calculated within a 500 m buffer around each sampled orchard plot. We demonstrate that both landscape and local factors influence the infestation indexes of B. dorsalis in mango orchards. At a landscape scale, B. dorsalis was favoured by habitat diversity, which probably provided complementary larval food resources and enabled populations to maintain throughout the year. On a local scale, individual farmers’ practices had a significant influence on infestation indexes. The proportion of infested fruits was lower in plots managed by farmers who practised sanitation.