Introduction: gamification consists of the application of game elements and mechanics in non-game contexts, such as education. The elements that can be included in a gamification strategy are very varied, from the design of characters and virtual worlds to the use of rewards and challenges. Aim: to analyze the implementation of a gamification strategy in the Master's Degree in Teacher Training. Methods: a case-control study was conducted. The sample consisted of 84 students who were divided into two groups: an experimental group, which received the gamification intervention, and a control group that did not receive any intervention. To evaluate the effectiveness of the intervention, student retention and knowledge acquisition were measured through the implementation of an assessment tool. Results: it was observed that the mean retention of participants between each session was similar in this group. This suggests that the length of the session itself did not have a significant impact on content retention. An increase in the number of interactions made in the chat between participants was observed, suggesting increased engagement and participation in the learning process. This increase in viewing time and student participation can be attributed to the implementation of the gamification methodology, which uses playful elements to motivate and maintain participants' interest in the learning process. Conclusions: the implementation of a gamification strategy in distance and online learning was an effective tool to improve student retention and knowledge acquisition.