What is the role of pyridine in the acylation reaction of amines?

The activating effect of –NH2 group can be controlled by protecting the -NH2 group by acetylation with acetic anhydride in presence of pyridine and then carrying out the desired substitution followed by hydrolysis of the substituted amide to the substituted amine. We know that pyridine is a base due to the presence of lone pair of electrons on the nitrogen atom. Thus, this strong base is used to get rid of the side product HCl from the reaction.


1