Interest in the cognitive precursors of literacy has been increasing in recent years since reading and writing are essential components of functional learning in the first years of schooling and of school success in later educational stages. However, it can be observed that while studies on the relationship between cognitive variables and reading are frequent, those carried out about writing are scarcer and in different languages and ages. The purpose of this study is to explore the joint contribution made by certain cognitive variables, measured at the ages of 6 and 7, to word writing among Spanish children in the second year of Primary Education (7 years old). In this longitudinal study, 116 Spanish-speaking pupils participated, from schools located in an average socio-cultural area, without special educational needs. Participants were evaluated in terms of their letter knowledge, phonological awareness, phonological memory, and alphanumeric and non-alphanumeric rapid automatised naming at 6 and 7 years of age, and word writing at 7 years of age. Descriptive-exploratory analyses, bivariate analyses, and multivariate regressions were modelled. In general, the findings show a different contribution for the cognitive variables considered in word writing at the age of seven, although this contribution does not vary substantially between the ages of 6 and 7 among Spanish pupils. Phonological knowledge at 6 and 7 years of age is the variable that best predicts the writing of words at 7 years. The contribution of non-alphanumeric speed naming remains constant and alphanumeric speed naming does not contribute to the explanation of writing at this age. Phonological memory at 6 years of age contributes to the explanation of writing at the age of 7 and letter knowledge contributes at the age of 7. These results have implications for educational practice and for the theory of writing acquisition in transparent languages.