Summary Background Onychomycosis accounts for up to 50% of all onychopathies. Objectives To evaluate the efficacy of four posaconazole regimens compared with placebo in the treatment of toenail onychomycosis, to assess the safety and tolerability of posaconazole, and to estimate the relative efficacy of posaconazole against terbinafine. Methods A phase 2B, randomized, placebo- and active-controlled, parallel-group, multicentre, investigator-blinded (double blind for placebo) study (ClinicalTrials.gov identifier: NCT00491764). Onychomycosis patients aged 18-75 years (n = 218) were randomized equally to one of six treatment regimens: posaconazole (oral suspension) 100, 200 or 400 mg once daily (24 weeks); posaconazole 400 mg once daily (12 weeks); terbinafine (tablets) 250 mg once daily (12 weeks); or placebo (24 weeks). The primary efficacy variable was complete cure (negative mycology and 0% nail involvement) at week 48. Results All posaconazole treatment arms had a significantly (P & 0·012) greater proportion of patients with complete cure at week 48 compared with placebo. The proportions of patients with complete cure were numerically higher for posaconazole 200 mg/24 weeks (54·1%) and 400 mg/24 weeks (45·5%), but lower for 400 mg/12 weeks (20%) compared with terbinafine (37%; differences were not statistically significant). Posaconazole was well tolerated. Seven patients receiving posaconazole withdrew because of asymptomatic liver enzyme increases, as mandated by protocol discontinuation criteria. Conclusions The efficacy and favourable safety profile of posaconazole suggest a potential new treatment for onychomycosis. The availability of low-cost generic terbinafine may limit posaconazole use to second-line treatment of infections refractory to, or patients intolerant of, terbinafine, or nondermatophyte mould infections. © 2011 British Association of Dermatologists.