ABSTRACT Background: Bullying is a social problem where there is a phenomenon of intentional aggression that occurs in all schools. It has multiple negative consequences for the victim’s psychological health. As school is a context for learning about life in society, strategies to prevent such attitudes and behaviours should be encouraged. Although some studies seem to indicate the potential of the subject of physical education to promote attitudes and behaviours against bullying, there is still insufficient scientific evidence to deduce a positive impact on the reduction or prevention of this phenomenon. Purpose: This study aimed to analyse the effectiveness of a specific intervention to prevent bullying in Physical Education classes in Secondary Education. 6 specific sessions inserted into the physical education curriculum to find out what bullying is, who its protagonists are and how to prevent it. Participants and setting: In the study, 764 students with an age range of 12–19 years (49.3% girls; age mean [M] = 14.80, standard deviation [SD] = 1.69) from two public educational centres participated. Among them, 439 were randomly assigned to the quasi-experimental group (48.1% girls; age M = 14.70, SD = 1.59) and 325 to the control group (51.1% girls; age M = 14.94, SD = 1.83). Data were collected at two timepoints, pre- and the post-intervention data. Data collection: The Spanish version of the European Bullying Intervention Project Questionnaire (EBIPQ) was used to measure the incidence of bullying. To measure cyberbullying, the Spanish version of the European Cyberbullying Intervention Project Questionnaire (ECIPQ) scale was used. Data analysis: The Student t-test was performed to compare possible differences between the experimental and control groups in the pre-test. To compare the means of the factors obtained based on the variables and the instruments used, as well as the scores obtained from the subjects of the experimental and control groups at the two timepoints, linear models of repeated measurements have been established comparing the pre- and post-intervention moments and the experimental and control groups, introducing sex and grade variables to compare the effectiveness of the programme based on them. Results: There were no differences in the pre-test measurements in any of the variables. After the intervention programme in the quasi-experimental group, the bullying victimisation (F = 16,951; p = .000) and bullying aggression (F = 5,215; p = .023) rates decreased significantly more than they did the control group. Likewise, victimisation in cyberbullying (F = 6,234; p = .013) decreased significantly differently, but aggression in cyberbullying did not (F = 0,099; p = .753). Conclusion: The implementation of a specific intervention to prevent bullying inserted into the physical education curriculum seems to have decreased bullying and cyberbullying victimisation.