To evaluate an online training program for physician supervisors with the aim of promoting a mentally healthy workplace by improving their use of both responsive and preventive mental health support strategies. Cluster randomised, waitlist-controlled trial. Royal Australasian College of Physicians fellows who were supervising at least one resident physician in any of the 31 primary health networks in Australia and 20 district health boards in New Zealand (health network clusters). A brief online skills-based mental health training program, comprising twelve modules grouped into three topics: common mental illnesses; helping trainees you are concerned about (responsive strategies); and minimising mental health risks at work (preventive strategies). Change between baseline and the 3-month assessment in self-reported recommended supervisor behaviours; differences between intervention and control groups in recommended behaviour scores three weeks, three months, and six months after the program. Ninety physicians from 20 health network clusters were allocated to the intervention group, 88 physicians from 22 clusters to the control group. Intervention group participants reported greater positive change in behaviour across the study period than those in the control group (mixed model repeated measures analysis, group × time interaction: P < 0.001). The mean change in self-reported supervisory behaviour score was higher for the intervention than the control group at the 3-week (mean difference in score, 1.6; 95% confidence interval [CI], 0.8-2.4), 3-month (0.9; 95% CI, 0.2-1.6), and 6-month assessments (1.9; 95% CI, 1.1-2.7). The mean change in self-reported responsive behaviour score was also greater for the intervention group at the 3-week (mean difference, 2.3; 95% CI, 1.5-3.1), 3-month (1.0; 95% CI, 0.2-1.9), and 6-month assessments (2.0; 95% CI, 1.1-2.9); differences in the mean change in preventive behaviour scores were statistically significant at the 3-week (mean difference, 1.1; 95% CI, 0.1-2.2) and 6-month assessments (1.8; 95% CI, 0.8-2.8), but not the 3-month assessment (0.8; 95% CI, -0.1 to 1.7). Brief online mental health training for senior physicians can lead to changes in their self-reported behaviour for supporting the mental health needs of resident physicians. Whether this leads to better mental health for resident physicians should be investigated. Australian New Zealand Clinical Trials Registry, ACTRN12619001496101 (prospective).