Prenatal maternal infection is an environmental risk factor for neurodevelopmental psychiatric illness and disease-associated cognitive impairments. Modeling this epidemiological link in animals shows that prenatal immune challenge is capable of inducing long-lasting deficits in numerous cognitive domains. Here, we combined a neonatal cross-fostering design with a mouse model of prenatal immune challenge induced by maternal gestational treatment with the viral mimetic poly(I:C) to dissect the relative contribution of prenatal and postnatal maternal effects on the offspring. We show that offspring prenatally exposed to poly(I:C) display significant impairments in spatial matching-to-position working memory and spatial novelty presence regardless of whether they are raised by gestationally immune-challenged or non-challenged control surrogate mothers. Likewise, prenatally immune challenged offspring exhibit reduced glutamic acid decarboxylase 65-kDa (GAD65) and 67-kDa (GAD67) gene expression in the adult medial prefrontal cortex and dorsal hippocampus largely independently of the postnatal rearing conditions. In addition, we confirm that being raised by a gestationally immune-challenged surrogate mother is sufficient to increase the offspring's locomotor response to systemic amphetamine treatment. Our data thus suggest that prenatal infection-induced deficits in spatial short-term memory are mediated by prenatal maternal effects on the offspring. At the same time, our study adds further weight to the notion that being reared by a surrogate mother that experienced immune activation during pregnancy may constitute a risk factor for specific dopaminergic abnormalities.