Sludge is a biohazardous solid waste that is produced during wastewater treatment. It contains antibiotic resistance genes (ARGs) that pose significant antimicrobial resistance (AMR) threats. Herein, aerobic and anaerobic membrane bioreactors (AeMBRs and AnMBRs, respectively) were compared in terms of the volume of waste sludge generated by them, the presence of ARGs in the sludge, and the potential for horizontal gene transfer (HGT) events using metagenomics to determine which treatment process can better address AMR concerns associated with the generation of waste sludge. The estimated abundance of ARGs in the suspended sludge generated by the AnMBR per treated volume is, on average, 5-55 times lower than that of sludge generated by the AeMBR. Additionally, the ratio of potential HGT in the two independent runs was lower in the anaerobic sludge (0.6 and 0.9) compared with that in the aerobic sludge (2.4 and 1.6). The AnMBR sludge exhibited reduced HGT of ARGs involving potential opportunistic pathogens (0.09) compared with the AeMBR sludge (0.27). Conversely, the AeMBR sludge displayed higher diversity and more transfer events, encompassing genes that confer resistance to quinolones, rifamycin, multidrug, aminoglycosides, and tetracycline. A significant portion of these ARGs were transferred to