UNLABELLED: Dietary patterns, such as the Mediterranean diet (MD) and the Western diet (WD), influence gut microbiota composition and functionality, which play important roles in energy metabolism and nutrient absorption. OBJECTIVES: A descriptive cross-sectional study was designed to evaluate the gut microbiota of 19 Spanish adolescents and to investigate the association of MD and ultra-processed food (UPF) intake with microbial diversity and community structure. METHODS: Functional diversity of gut microbiota was evaluated using Biolog EcoPlates, taxonomic composition was assessed with 16S rRNA sequencing via MinION, and phenotypic responses to antibiotics were analyzed using the cenoantibiogram technique under aerobic and anaerobic conditions. RESULTS: Adolescents with higher adherence to the MD exhibited greater functional diversity, as per the Shannon-Weaver index. In addition, this group showed higher abundance of bacterial genera previously described as beneficial, such as CONCLUSIONS: These results suggest that the MD promotes a healthier and more balanced gut environment, potentially improving metabolic functions in adolescents. Despite the lack of differences in α-diversity, comparisons of microbial community structure between adolescents following the MD and those with high UPF (characteristic of the WD) showed clear differences in terms of β-diversity. These findings suggest that dietary patterns influence the composition of the gut microbiota in a more complex manner, beyond just taxonomic richness. The outcomes of this exploratory study highlight opportunities for future research to deepen understanding of the long-term health implications of these dietary patterns, as well as the mechanisms regulating the composition, functionality, and phenotypic responses to antibiotics of gut microbial communities.