In this study, the microbial community structures of the endosphere of the halophyte Arthrocnemum macrostachyum were evaluated from two locations in Mallorca, Spain, focusing on three plant compartments (roots, green and red stems) compared to the rhizospheric soil where the plants grew. The physicochemical parameters of the rhizospheric soils differed between locations, and the soils were characterized by different microbial community structures. Accordingly, the endophytic community composition, mainly composed of putatively halophilic organisms, was highly influenced by the rhizospheric soil microbiota, as revealed by the co-occurrence of the major endophytic taxa in the endosphere and the rizospheric soils. Moreover, the reduction of diversity from the endorhizosphere towards the red leaves may support the fact that part of colonization of the plant by bacteria could have an origin in the rhizospheric soils through the roots and subsequent migration to the aerial parts of the plant. Finally, there were certain relevant ubiquitous taxa, such as Chromohalobacter canadensis, Rudaea cellulosilytica (never reported before as endophytic), Psychrobacter sp., Bradyrhizobium sp. and Halomonas sp., that, due their moderate halophilic nature, seemed to find an optimal environment inside the plants. Some of these relevant endophytes were not always detectable in their respective soils, and were probably part of the soils’ rare biosphere, which would gain preponderance in a favorable endophytic environment.