In this study, microbial community dynamics were assessed in two lab-scale anaerobic sequencing batch reactors (ASBRs). One of the reactors was fed by synthetic pharmaceutical industry wastewater with sulfamethoxazole (SMX) as the test reactor and the other without sulfamethoxazole as the control reactor. DNA based DGGE results indicated that Clostiridum sp. became dominant in the SMX reactor while the inoculum was dominated with Firmicutes (61%) and Methanomicrobiales (28%). However their abundances in active community decreased through the last phase. Also the abundance of hydro-genotrophs was high in each phase, while acetoclastic methanogens disappeared in the last phase. Q-PCR analysis revealed that there is a significant reduction in the bacterial community approximately 84%, while methanogens increased to 97% through the operation. Additionally an increase in the expression level of bacterial and methanogenic 16S rRNA (60% and 20%, respectively) was detected. Significant correlation between microbial community and the reactor operation data was found. The study demonstrated that the microbial community maintains the system stability under high antibiotic concentration and long-term operation by homoacetogenesis coupled with hydrogenotrophic methanogenesis. (C) 2015 Elsevier Ltd. All rights reserved.