The potential of the system, a hybrid anaerobic baffled reactor (HABR) coupled with a multi-stage active biological process (MSABP) reactor, for simulated dairy wastewater at various temperature, hydraulic retention time (HRT), and pH was investigated. Percentage removals of chemical oxygen demand (COD) and NH4+ were optimized using response surface methodology. Under optimized conditions (temperature, 33 degrees C; HRT, 24 h; pH, 7.35), the removal efficiencies of COD and NH4+ were 99.89% and 97.83%, respectively. Miseq sequencing analysis exhibited that the anaerobic segment of the system was dominated by fermentation and acetogenic bacteria, and in the aerobic segment, microorganisms involved in the nitrogen cycle were significantly enriched. Meanwhile, it could be found that the excess sludge production of the process was much lower than that of other bio-processes. The average excess sludge production rate was 0.025-0.05 g SS/g COD removed under different organic loadings.