This study investigated fundamental mechanisms that anaerobic biomass employ to cope with salinity, and applied these findings to a continuous SAMBR. When anaerobic biomass was exposed to 20 and 40 g NaCl/L for 96 h, the main solute generated de novo by biomass was trehalose. When we separately introduced trehalose, N-acetyl-beta-lysine and potassium into a batch culture a slight decrease in sodium inhibition was observed. In contrast, the addition of 0.1 mM and 1 mM of glycine betaine dramatically improved the adaptation of anaerobic biomass to 35 g NaCl/L, and it continued to enhance the adaptation of biomass to the salt for the next three batch feedings. without further addition. No shift in archaeal microbial diversity was found when anaerobic biomass was exposed in batch mode to 35g NaCl/L for 360 h, and no changes were found when glycine betaine was added. The dominant species identified under these conditions were Methanosarcina mazeii and Methanosaeta sp. The addition of 5 mM glycine betaine to a continuous SAMBR at 12 h hydraulic retention time (HRT), and operation in batch mode for 2 days can significantly enhance saline (35 g NaCl/L) synthetic sewage degradation. In addition, the injection of 1 mM of glycine betaine into a SAMBR for five subsequent days also significantly enhanced dissolved organic carbon (DOC) removal from sewage under these conditions. The main compatible solutes generated by anaerobic biomass after 44 days exposure to 35g NaCl/L in a SAMBR were N-acetyl-beta-lysine and glycine betaine. Finally, the addition of 1 mM glycine betaine to the medium was beneficial for anaerobic biomass in batch mode at 20 degrees C under saline and non saline conditions.