a Close-up of GBS (anti-GBS, green) attached to the SPG (mdr65-mtd-Tomato, red) and inside the brain. DAPI, blue. The dashed line outlines the interface between the SPG and the external milieu. b Bacterial count inside the brain 24 h post-infection. Numbers above the boxes represent the number of larvae analysed. c Close-up of confocal images (top view and orthogonal view) of non-infected and GBS-infected brains at 6 h post-infection, without and with HEPES, showing Collagen IV staining (Vkg::GFP, green) and GBS (red). d Confocal images (top view and close-up orthogonal view) of non-infected and of GBS-infected brains without and with HEPES at 6 h post-GBS infection, showing PG membrane (NP6293-GAL4>mCD8-GFP, light orange). GBS (green). e Close-up of confocal images of non-infected brain and brain infected with WT GBS with and without acidosis, showing the SPG membrane (mdr65-mtd-tomato, red) and septate junctions (Lachesin::GFP, green) at 6 h post-infection. Dashed lines outline SPG damages. f GBS entry at 6 h post-infection was not significantly changed when endocytosis was blocked (dynamints) in the PG. Student’s t-test: p = 0.8484. Control (n = 7); PG>dynamints (n = 8). g BBB permeability tests for non-infected (−) and GBS-infected brains at 6 h post-infection without (black) and with HEPES (purple). One-way ANOVA test followed by Tukey’s multiple comparisons test generated adjusted p-values: p(- vs WT GBS) < 10−10; p(- HEPES vs WT GBS HEPES) = 0.0022; p (WT GBS vs WT GBS + HEPES) < 10−10. n(−) = 7, n(WT GBS) = 7, n(- HEPES) = 8, n(WT GBS + HEPES) = 8. h Bacterial count inside the brain in GBS entry without (black) and with HEPES (purple) at 6 h (two-tailed Mann–Whitney test, p = 0.0102). n(GBS) = 17 and n(GBS + HEPES) = 19. Box and whiskers plot: whiskers mark the minimum and maximum, the box includes the 25th–75th percentile, and the line in the box is the median. *p ≤ 0.05; **p ≤ 0.01; ****p ≤ 0.0001; ns, not significant. Source data are provided as a Source Data file for b and f–h.