An improved synthesis of tadalafil, a drug for the treatment of male erectile dysfunction, involves the use of safer solvents and reagents as well as a reduced number of steps.