Classical novae are important contributors to the abundances of key isotopes, such as the radioactive (18)F, whose observation by satellite missions could provide constraints on nucleosynthesis models in novae. The (17)O(p,γ)(18)F reaction plays a critical role in the synthesis of both oxygen and fluorine isotopes, but its reaction rate is not well determined because of the lack of experimental data at energies relevant to novae explosions. In this study, the reaction cross section has been measured directly for the first time in a wide energy range E(c.m.)~/= 200-370 keV appropriate to hydrogen burning in classical novae. In addition, the E(c.m.)=183 keV resonance strength, ωγ=1.67±0.12 μeV, has been measured with the highest precision to date. The uncertainty on the (17)O(p,γ)(18)F reaction rate has been reduced by a factor of 4, thus leading to firmer constraints on accurate models of novae nucleosynthesis.