Background: Mangrove ecosystems are vulnerable due to the exotic Spartina alterniflora invasion in China. Large knowledge gaps remain with regard to archaeal and bacterial communities assembly processes and microbial interactions under S. alterniflora invasion. Here, using 16S rRNA gene amplicon sequencing, we investigated the assembly processes and co-occurrence relationships of the archaeal and bacterial communities under S. alterniflora invasion along the coastlines of Fujian province, southeast China.Results: We found that the overall archaeal and bacterial communities were driven predominantly by stochastic processes, and the relative role of stochasticity was stronger for bacteria than archaea. Co-occurrence network analysis showed that the network structure of bacteria was more complex than that of the archaea. Putative keystone taxa often had low relative abundances (conditionally rare taxa), suggesting conditionally rare taxa or low abundances taxa may significantly contribute to network stability. Moreover, we found that S. alterniflora invasion changed the microbial communities assembly and co-occurrence patterns, indicating that S. alterniflora affected the composition and stability of the microbial community.Conclusions: This study provides the first comparison in the biogeography and co-occurrence patterns of both archaea and bacteria in mangrove ecosystem. And this is the first exploration about the effect of S. alterniflora invasion on archaeal and bacterial ecological processes and co-occurrence patterns. Our study considers that the control of S. alterniflora invasion is important for mangrove ecosystem function and service.