In exchange for extrafloral nectar, ants deter herbivores from the plants, reducing the amount of herbivory they suffered. However, this defensive mutualism can sometimes have negative effects on plants, as ants may also visit flowers, deterring pollinators and reducing plant fitness. The Distraction Hypothesis posits that extrafloral nectaries (EFNs) have the function of attracting ants and preventing them from visiting flowers and disrupting pollination. In the present study, we tested this hypothesis in the field by conducting an ant-exclusion experiment in Ferocactus recurvus plants. First, we evaluated the effect of ants on pollination. Then, we tested the predictions of the Distraction Hypothesis. Specifically, we hypothesized that ants have a negative effect on plant pollination and that EFNs function to distract ants, keeping them away from flowers and preventing them from disrupting pollination. According to our hypothesis, we found that ant visits to flowers resulted in a decrease in seed production and overall plant fitness. Flowers with ants had fewer seeds and were smaller in size compared to ant-excluded flowers. In accordance with the Distraction Hypothesis, we found that a higher number of EFNs reduced the probability of finding ants on flowers. To minimize ant-pollinator conflict, F. recurvus plants produce EFNs with higher sucrose concentrations, which effectively keep ants away from the flowers. Plant width was found to be positively correlated with the number of EFNs and flowers, and there is an “optimal” number of EFNs that attracts a higher number of ants. Overall, our findings highlight the complex and dynamic nature of interactions between plants, ants, and pollinators, and the potential trade-offs that exist between ant protection and pollinator attraction.