A process for the production of melamine by the pyrolysis of urea which comprises the following steps: a) producing melamine by the pyrolysis of urea in a specific reactor and separating a biphasic liquid/gas effluent produced in the pyrolysis reaction of urea into a liquid stream of raw melamine and into a first stream of anhydrous off-gases comprising NH3, CO2 and melamine vapour; b) putting said liquid stream of raw melamine in contact with a stream of anhydrous gaseous NH3 in a specific post-reactor and forming a liquid stream of melamine impoverished in CO2 and partially purified and a second stream of anhydrous gases comprising NH3, CO2 and melamine vapour; c) putting the first stream of anhydrous gases coming from step a) in contact with at least one aqueous washing stream, forming an aqueous stream, comprising melamine, NH3, CO2 and a gaseous stream of wet off-gases, comprising NH3, CO2 and water vapour; d) mixing the second stream of anhydrous gases coming from step b) with a stream of recycled water and forming an aqueous ammonia solution in which the melamine contained in the stream of anhydrous gases is dissolved, recovering the sensible heat and condensation heat of the gases; e) removing, from the aqueous stream of step c), comprising melamine, NH3, CO2, at least a part of the CO2 contained therein and forming a gaseous stream comprising the CO2 removed and an aqueous stream comprising melamine, NH3 and impoverished in CO 2; f) subjecting the liquid stream of melamine impoverished in CO2 and partially purified, coming from the post-reactor, to a quench-ammonolysis treatment by contact with the aqueous ammonia solution obtained in step d), and the formation of an aqueous ammonia stream comprising purified melamine; g) recovering the melamine contained in the aqueous ammonia stream comprising purified melamine coming from step f) and the melamine contained in said aqueous stream comprising melamine and impoverished in CO2 coming from step (e) by means of a crystallization step by cooling and separation, with the formation of a stream of crystallized melamine and a stream of mother liquor. a) producing melamine by the pyrolysis of urea in a specific reactor and separating a biphasic liquid/gas effluent produced in the pyrolysis reaction of urea into a liquid stream of raw melamine and into a first stream of anhydrous off-gases comprising NH3, CO2 and melamine vapour; b) putting said liquid stream of raw melamine in contact with a stream of anhydrous gaseous NH3 in a specific post-reactor and forming a liquid stream of melamine impoverished in CO2 and partially purified and a second stream of anhydrous gases comprising NH3, CO2 and melamine vapour; c) putting the first stream of anhydrous gases coming from step a) in contact with at least one aqueous washing stream, forming an aqueous stream, comprising melamine, NH3, CO2 and a gaseous stream of wet off-gases, comprising NH3, CO2 and water vapour; d) mixing the second stream of anhydrous gases coming from step b) with a stream of recycled water and forming an aqueous ammonia solution in which the melamine contained in the stream of anhydrous gases is dissolved, recovering the sensible heat and condensation heat of the gases; e) removing, from the aqueous stream of step c), comprising melamine, NH3, CO2, at least a part of the CO2 contained therein and forming a gaseous stream comprising the CO2 removed and an aqueous stream comprising melamine, NH3 and impoverished in CO 2; f) subjecting the liquid stream of melamine impoverished in CO2 and partially purified, coming from the post-reactor, to a quench-ammonolysis treatment by contact with the aqueous ammonia solution obtained in step d), and the formation of an aqueous ammonia stream comprising purified melamine; g) recovering the melamine contained in the aqueous ammonia stream comprising purified melamine coming from step f) and the melamine contained in said aqueous stream comprising melamine and impoverished in CO2 coming from step (e) by means of a crystallization step by cooling and separation, with the formation of a stream of crystallized melamine and a stream of mother liquor.