Membrane fouling in a membrane bioreactor (MBR) is highly influenced by the characteristics of the influent, the mixed liquor microbial community and the operational parameters, all of which are environment specific. Therefore, we studied the dynamics of microbial community during the treatment of real municipal wastewater in a pilotscale anoxic-oxic (A/O) MBR equipped with a gravity-driven membrane filtration system. The MBR was operated at three different solid retention times (SRTs): 25, 40 and 10 days for a total period of 180 days in Nordic environmental conditions. Analysis of microbial community dynamics revealed a high diversity of microbial species at SRT of 40 days, whereas SRT of 25 days was superior with microbial richness. Production of soluble microbial products (SMP) and extracellular polymeric substances (EPS) was found to be intensely connected with the SRT and food to microorganism (F/M) ratio. Relatively longer operational period with the lowest rate of membrane fouling was observed at SRT of 25 days, which was resulted from the superior microbial community, lowest production of SMP and loosely bound EPS as well as the lower filtration resistance of larger sludge flocs. Abundance of quorum quenching (QQ) bacteria and granular floc forming bacterial genera at SRT of 25 days provided relatively lower membrane fouling tendency and larger floc formation, respectively. On the other hand, substantial amount of various surface colonizing and EPS producing bacteria was found at SRT of 10 days, which promoted more rapid membrane fouling compared with the fouling rate seen at other tested SRTs. To sum up, this research provides a realistic insight into the impact of SRT on microbial community dynamics and resulting characteristics of mixed liquor, floc size distribution and membrane fouling for improved MBR operation.