Wastewater containing formaldehyde and urea was treated using a coupled system consisting of a biofilm airlift suspension (BAS) reactor and an anoxic upflow sludge blanket (USB) reactor. The anoxic USB reactor was used to carry out denitrification and urea hydrolysis, while the BAS reactor was used to carry out nitrification. In a first step, individual experiments were carried out to investigate the effects of both compounds on the nitrifying and denitrifying biomass. The BAS reactor was fed with a synthetic medium containing 500 mg N-NH4+ L-1 and 100 mg N-urea L-1, that were added continuously to this medium. Neither urea hydrolysis nor inhibition of nitrification was observed. Nitrification efficiency decreased when formaldehyde was fed during shocks at concentrations of 40, 80 and 120 mg C-formaldehyde L-1. The anoxic USB reactor was fed with a synthetic medium containing nitrate, formaldehyde and urea. Concentrations of formaldehyde in the reactor of 100-120 mg C-formaldehyde L-1 caused a decrease in the denitrification and urea hydrolysis rates. In a second step, the coupled system was operated at recycling ratios (R) of 3 and 9. Fed C/N ratios of 0.58, 1.0 and 1.5 g C-formaldehyde g-1 N-NH4+ were used for every recycling ratio. The maximum nitrogen removal percentages were achieved at a C/N ratio of 1.0 g C-formaldehyde g-1 N-NH4+ for both recycling ratios. A fed C/N ratio of 1.5 g C-formaldehyde g-1 N-NH4+ caused a decrease in the efficiency of the system with respect to nitrogen removal, due to the presence of formaldehyde in the BAS reactor, which decreased the nitrification. Formaldehyde was completely removed in the BAS reactor and a heterotrophic layer formed around the nitrifying biofilm.