a) Alkylation reaction

Pyridine reacts with alkyl halides, alkanoyl halides, and anhydrides to form pyridinium salts. The reaction proceeds through the nucleophilic attack of the lone pair of nitrogen on the electrophilic carbon of said reagents.

alkylation-pyridine

This alkylation reaction can only be carried out with primary and secondary substrates since the tertiary ones undergo elimination reactions.

pyridine-elimination

b) Acylation reaction

acylation-pyridine

The acylation mechanism occurs with a first stage of addition by nucleophilic attack of the pyridine nitrogen on the halide carbonyl. In the second stage the elimination of the halogen occurs.