Climate change has favored the emergence of the Tomato leaf curl New Delhi virus (ToLCNDV) as a threat to melon production in the Mediterranean region. Deciphering the mechanisms regulating melon-ToLCNDV interactions is crucial in developing resistant varieties in the current climatic scenario. In this regard, DNA primase has recently been proposed as a recessive resistance gene for ToLCNDV. Here, we explored the molecular basis of ToLCNDV resistance in melon, focusing on the DNA-primase gene and the stress-responsive miR395. Using virus-induced gene silencing (VIGS) and transient expression assays, we show that DNA-primase silencing reduces ToLCNDV accumulation in susceptible plants, whereas overexpression increases the viral load in a resistant cultivar. Computational predictions, validated by transient expression analysis identified miR395 as a regulator of DNA-primase expression. Next, we found that adverse environmental conditions, such as salinity and drought, increase miR395 accumulation, downregulating DNA-primase and enhancing ToLCNDV resistance in susceptible melon cultivars. This study provides the first evidence that environmental conditions directly affect geminivirus infection dynamics via miR395-mediated DNA-primase regulation. These findings underscore the potential of targeting DNA-primase for breeding ToLCNDV-resistant melon varieties and highlight the environment influence on virus-host interactions, offering insights for sustainable disease management in crops.