Biomass characteristics may change subject to a salinity increase when treating high strength wastewater. In this study, the impact of salinity in a membrane bioreactor (MBR) was investigated for the treatment of produced water (PW). MBR was operated as a pre-treatment prior to nanofiltration (NF) and reverse osmosis (RO). Mixed PW, that was originated from different oil, gas, and oil-gas wells, were subjected to pre-treatment for 146 days including three different operational phases: Low-salinity (similar to 10 mS/cm), gradual increased salinity (10-40 mS/cm) and high salinity (similar to 40 mS/cm). The results of this study showed that microorganisms could adapt using real wastewater and treat PW up to a certain level of the salinity. At high salinity levels of PW, the floc structure started to be disrupted and membrane fouling was accelerated. PCR-DGGE analysis confirmed the changes in microbial communities' composition in relation with high salinity. The results of the final treatment experiments presented that NF and RO treatment produced high-quality effluents that could be suitable for reuse. (C) 2018 Published by Elsevier B.V.