a | The meninges are a multipartite membrane structure composed of the dura mater, which is in contact with the skull, the arachnoid mater and the pia mater, which is in contact with the brain parenchyma. Cerebrospinal fluid (CSF), within which the majority of meningeal immune cells reside, flows between the arachnoid mater and the pia mater in the subarachnoid space. Meningeal immune cells — including B cells, T cells, dendritic cells (DCs), macrophages, mast cells and granulocytes — are found within the subarachnoid space. Access from blood vessels to the meningeal spaces requires cells to penetrate through the blood–meningeal barrier (not shown). In the pr esence of meningeal T cells, the phenotype of meningeal myeloid cells is kept ‘in check’, and normal cognitive function is ensured. b | In the absence of T cells, the meningeal myeloid cells acquire a pro-inflammatory phenotype, which interferes with learning behaviour.