The first step of the production of MDI is the reaction of aniline and formaldehyde, using hydrochloric acid as a catalyst to produce a mixture of diamine precursors, as well as their corresponding polyamines: