Nitrogen-based thermoset polymers have many industrial applications (for example, in composites), but are difficult to recycle or rework. We report a simple one-pot, low-temperature polycondensation between paraformaldehyde and 4,4'-oxydianiline (ODA) that forms hemiaminal dynamic covalent networks (HDCNs), which can further cyclize at high temperatures, producing poly(hexahydrotriazine)s (PHTs). Both materials are strong thermosetting polymers, and the PHTs exhibited very high Young's moduli (up to ˜14.0 gigapascals and up to 20 gigapascals when reinforced with surface-treated carbon nanotubes), excellent solvent resistance, and resistance to environmental stress cracking. However, both HDCNs and PHTs could be digested at low pH (<2) to recover the bisaniline monomers. By simply using different diamine monomers, the HDCN- and PHT-forming reactions afford extremely versatile materials platforms. For example, when poly(ethylene glycol) (PEG) diamine monomers were used to form HDCNs, elastic organogels formed that exhibited self-healing properties.