Amines and ammonia react with alkanoyl halides to form amides. The reaction is favored with an excess of amine, in order to eliminate the hydrochloric acid released in the reaction.

 

reaccion-haluros-alcanoilo-amidas
 
The mechanism occurs in two stages:
 
Stage 1. Addition of the amine to the halide
 
reaccion-haluros-alcanoilo-amidas
 
Stage 2. Chloride removal
 
reaccion-haluros-alcanoilo-amidas
 
This reaction can only be carried out with primary or secondary amines. Tertiary amines do not form amides and give rise to alkanoyl ammonium salts.