Given the economic importance of cucurbits and the losses incurred by fruit fly infestation, the population dynamics of fruit flies in cucurbit crops and the influence of abiotic parameters, such as temperature, relative humidity, rainfall, and total sunshine hours per day on the fruit fly population were studied. The study was carried out at six locations; in district Srinagar the locations were Batmaloo, Shalimar, and Dal, while in district Budgam the locations were Chadoora, Narkara, and Bugam (Jammu and Kashmir, India). Various cucurbit crops, such as cucumber, bottle gourd, ridge gourd and bitter gourd, were selected for the study. With regard to locations, mean fruit fly population was highest (6.09, 4.55, 3.87, and 3.60 flies/trap/week) at Batamaloo and Chadoora (4.73, 3.93, 2.73, and 2.73 flies/trap/week) on cucumber, bottle gourd, ridge gourd, and bitter gourd, respectively. The population of fruit flies was significantly correlated with the minimum and maximum temperature. The maximum species diversity of fruit flies was 0.511, recorded in Chadoora. Bactrocera cucurbitae (Coquillett) (Diptera: Tephritidae) was the most predominant species in both Srinagar and Budgam, followed by B. dorsalis (Hendel) and B. tau (Walker), while B. scutellaris (Bezzi) was found only in Chadoora. Results of the present investigation may be utilized in developing a sustainable pest management strategy in the agroecological system.