Socioeconomic position (SEP) may have different effects on cognitive development and family context could play a role in this association. This work aimed to analyse the role of socioeconomic positions, measured via various indicators collected longitudinally, in cognitive development at 7-11years of age, evaluating the role of family context as a potential mediator. The study sample included 394 and 382 children from the INMA Gipuzkoa and Valencia cohorts, respectively. SEP indicators were assessed during pregnancy (family social class, parental education, employment, and disposable income) and at 7 (Gipuzkoa) and 11 (Valencia) years of age (At Risk of Poverty or Social Exclusion (AROPE)). Family context and cognitive development were measured with the Haezi-Etxadi Family Assessment Scale 7-11 (HEFAS 7-11) and Raven's Coloured Progressive Matrices (Raven's CPM), respectively. Linear regression models were developed to assess the relationships between (a) SEP-family context, (b) SEP-cognitive development, and (c) family context-cognitive development, adjusting for a priori-selected confounders. Simple and multiple mediation analyses were performed to explore the role of family context in the SEP-cognitive development relationship. Lower SEP was related with a lower cognitive score, this association being particularly robust for family social class. SEP indicators were related to subscales of family context, in particular those regarding cognitive stimulation, parental stress, and parenting. A relationship was also found between these three subscales and child cognitive development, mediating the effect of family social class on child cognition by 5.2, 5.5, and 10.8%, respectively, and 12.0% jointly. Conclusion: Both family SEP and context contribute to a child's cognitive development. Equalising policies and positive parenting programmes could contribute to improving cognitive development in children. What is Known: • Parental social class, education, and employment status have been widely employed to measure socioeconomic position. What is New: • This work focuses on standard measurements of socioeconomic position but also other economic indicators such as the EHII and AROPE, and their effect on child cognitive development and family context. • Promotion of cognitive and linguistic development, parental stress and conflict, and parental profile fostering child development mediated the effect of family social class on cognitive development.