important variants of the friedel–crafts reaction include chloromethylation (with formaldehyde and hcl), formylation (with hcl and co or cn), and acylation with a nitrile as the acyl source. the nitrile-based acylation is particularly useful because it allows direct ortho-acylation of aniline without protecting the amine group. a combination of a weak and a strong lewis acid is necessary for the reaction to proceed, through the mechanism shown below. guided by this mechanism, and equipped with knowledge that gallium trihalides are among the strongest lewis acids, process chemists at merck were able to develop highly efficient conditions for this condition towards a drug candidate.