Water scarcity has evolved into a pressing global issue, significantly impacting numerous regions worldwide. The use of treated wastewater stands out as a promising solution to this problem. However, the proliferation of various contaminants, primarily Antimicrobial Resistance Genes (ARGs), poses a significant challenge to its safe and sustainable use. In this study, we assessed the composition and abundance of 373 ARGs, corresponding to 31 different classes of antibiotics, in six wastewater treatment plants (WWTP) in Agadir city of Morocco. Influent and effluent samples were collected during the months of February and July in 2020, in addition to samples from the Atlantic Ocean. In total, 223 ARGs were uncovered, highlighting in particular resistance to aminoglycoside, macrolide lincosamide, beta-lactamase, chloramphenicol, sulfonamide, tetracycline, and other antibiotics. The mechanisms of action of these ARGs were mainly antibiotic inactivation, antibiotic target alteration, efflux pump and cellular protection. Mobile genetic elements (MGEs) were detected at high levels their co-occurrence with ARGs highlights their involvement in the acquisition and transmission of ARGs in microbial communities through horizontal gene transfer. While many wastewater treatment methods effectively reduce a large proportion of gene material and pathogens, a substantial fraction of ARGs and other contaminants persist in treated wastewater. This persistence poses potential risks to both human health and the environment, warranting the need of more effective treatment strategies.