This study assessed the efficacy of two different Mycoplasma hyopneumoniae vaccination programmes in relation to the time of weaning. Eight hundred and twenty-eight piglets were randomly divided into three groups: group V1 was vaccinated three days before weaning, group V2 at weaning (21 days of age) and group NV was left non-vaccinated. Vaccinations were performed using Ingelvac MycoFLEX. After the nursery period, 306 pigs were allocated to fattening unit (F1) and 501 pigs to a second unit (F2). Efficacy was evaluated using performance parameters and pneumonia lesions at slaughter. Statistically significant differences were obtained in F2 where group V1 had a higher average daily weight gain compared to groups V2 and NV for the entire study period (17 and 18 g/day, respectively) and the fattening period (26 and 36 g/day, respectively) (P<0.05). Considering respiratory disease scores for both fattening units, group V1 was the only group where coughing severity did not increase significantly between placement and the end of the fattening period (P>0.05). Between groups, there were no statistically significant differences for the average lung lesion scores (V1=3.44; V2=4.61; NV=4.55, P>0.05) and the prevalence of pneumonia (V1=35.0 per cent; V2=38.0 per cent; NV=41.4 per cent, P>0.05). Overall, vaccination against M hyopneumoniae before weaning provided numerically better performance than vaccination at weaning, but did not reach statistical significance. An influenza outbreak in F1 and the presence of coexisting mixed respiratory infections in both F1 and F2 could have possibly influenced the performance of both vaccinated groups across all measured parameters.