OBJECTIVE: The objective of this article was to analyze the development, implementation and impact of a nutrition education program on the knowledge and attitudes associated with healthy eating habits. METHODS: Controlled randomized trial comprising teachers and children of eight public schools; three of them were submitted to educational activities and the remaining ones were kept as controls. Effects of nutrition education were measured in terms of knowledge and attitudes. RESULTS: The results revealed an improvement in the food choice among students and a reduction in the intake of foods with high energy density. An improvement in the knowledge and attitudes of the teachers towards the prevention of obesity was also observed. CONCLUSION: Even with a positive attitude regarding the development of this proposal, there was a lack of support from the studied schools. Future studies and a greater involvement by the Health and Education sectors could overcome such barriers, improving the results of school-based programs to prevent obesity.