Four reaction pathways from diborane and ammonia to borazine, (HBNH)3, have been studied computationally at the density functional level (B3LYP/6-311+G(2d,p)//B3LYP/6-31G(d)). The cycloaddition of H2BNH2 to 1,3-diaza-2,4-diborabuta-1,3-diene and subsequent elimination of two molecules of H2 was found to be the lowest-energy pathway to (HBNH)3. In the other pathways, the formation and conversion of the intermediates 1,3,5-triaza-2,4,6-triborahexatriene, cyclotriborazane, and 1,3,5-triaza-2,4,6-triborahexa-1,5-diene into (HBNH)3 were investigated. The formation of 1,3-diaza-2,4-diborabuta-1,3-diene and, subsequently, the formation and electrocyclization of 1,3,5-triaza-2,4,6-triborahexatriene and the cycloaddition of H2BNH2 to 1,3-diaza-2,4-diborabuta-1,3-diene are predicted to be the kinetically favored pathways to (HBNH)3 in the gas phase. At low concentrations of 1,3-diaza-2,4-diborabutene, high concentrations of H2BNH2, and a temperature of 298.15 K, the formation of the polyolefins H3BNH2(H2BNH2)nNHBH2 (n=1,2) is predicted to be competitive with the formation of 1,3-diaza-2,4-diborabuta-1,3-diene.