We aimed to explore how the invasion of the alien plantSolanum elaeagnifoliumaffects soil microbial and nematode communities in Mediterranean pines (Pinus brutia) and maquis (Quercus coccifera). In each habitat, we studied soil communities from the undisturbed core of both formations and from their disturbed peripheral areas that were either invaded or not byS. elaeagnifolium. Most studied variables were affected by habitat type, while the effect ofS. elaeagnifoliumwas different in each habitat. Compared to maquis, the soil in pines had higher silt content and lower sand content and higher water content and organic content, supporting a much larger microbial biomass (PLFA) and an abundance of microbivorous nematodes. The invasion ofS. elaeagnifoliumin pines had a negative effect on organic content and microbial biomass, which was reflected in most bacterivorous and fungivorous nematode genera. Herbivores were not affected. In contrast, in maquis, organic content and microbial biomass responded positively to invasion, raising the few genera of enrichment opportunists and the Enrichment Index. Most microbivores were not affected, while herbivores, mostlyParatylenchus,increased. The plants colonizing the peripheral areas in maquis probably offered a qualitative food source to microbes and root herbivores, which in pines was not sufficient to affect the much larger microbial biomass.