Operation of membrane bioreactors (MBRs) for wastewater treatment is hampered by the membrane biofouling resulting from microbial activities. However, the knowledge of the microbial ecology of both biofilm and activated sludge in MBRs has not been sufficient. In this study, we scrutinized microbial communities of biofilm and activated sludge from 10 full-scale MBR plants. Overall, Flavobacterium, Dechloromonas and Nitrospira were abundant in order of abundance in biofilm, whereas Dechloromonas, Flavobacterium and Haliscomenobacter in activated sludge. Community structure was analyzed in either biofilm or activated sludge. Among MBRs, as expected, not only diversity of microbial community but also its composition was different from one another (p <0.05). Between the biofilm and activated sludge, community composition made significant difference, but its diversity measures (i.e., alpha diversity, e.g., richness, diversity and evenness) did not (p> 0.05). Effects of ten environmental factors on community change were investigated using Spearman correlation. MLSS, HRT, F/M ratio and SAD(m) explained the variation of microbial composition in the biofilm, whereas only MLSS did in the activated sludge. Microbial networks were constructed with the 10 environmental factors. The network results revealed that there were different topological characteristics between the biofilm and activated sludge networks, in which each of the 4 factors had different associations with microbial nodes. These results indicated that the different microbial associations were responsible for the variation of community composition between the biofilm and activated sludge. (C) 2016 Elsevier Ltd. All rights reserved.