Tracing writing. Students writing in the context of Social studies education. This doctoral thesis is a contribution to the field of writing research and to the understanding of literacy practices as part of disciplinary learning. The thesis deals with writing as a literacy practice in the context of Social studies education in Swedish secondary school. Writing is understood in a broad sense, which include the use of different modalities and semiotic resources. The aim of the study is to explore and describe what characterises literacy practices, focusing on students´ writing in their daily school life, both inside and outside school. This is conducted by studying how writing emerge when students learn a subject content about law and order as part of the teaching of Social sciences. The analytical framework employed draws on the research of The New Literacy Studies (NLS), The Triadic model, (Triadmodellen), the Wheel of writing, (Skrivhjulet) and the sociological concepts of ritual, strategic and communicative actions. The concepts writing events, acts of writing and writing practices are central for the study. To form the foundation of an ecological understanding of writing as a literacy practice the data has been collected during a longer period of ethnographic fieldwork. The study employs a combination of ethnographic methods to enable a qualitative analysis and to establish a thick description. The collected materials include field notes from classroom observations together with audio- and video recordings combined with interviews with students and the teacher, students´ journals, assignments and a written test. The data also includes a survey, a collection of various texts such as teacher planning material, work material and instructions, textbook, policy documents, reflection notes and photos. The empirical results are presented in three chapters, each one of them focusing on students´ writing during teaching, writing in connection to an oral presentation and writing in conjunction with a final written test. The results show that writing in social sciences are used, primarily to store, organize and structure subject content, mainly by answering questions in the textbook which, together with the teaching, strongly mediates the subject content. This results in reproductive writing strategies and texts sticking close to the textbook. Furthermore, the results show that students´ disciplinary writing practices depend on where the writing is situated, in school or outside school, and that the acts of writing are conducted to prepare for oral participation in teaching. As spoken modes dominate during lessons, the writing practices appears in a supporting rather than independent role. A final important result is that the writing practices in general seem to be shaped by those required during a final written test. The results demonstrate how students´ writing is strategically and ritually motivated and that communicative actions are rare. It is argued that this is a result of the school culture´s and the teaching practices´ strong focus on final tests, assessment and grading, which in turn has to do with the Swedish school system governed by a national curriculum based on performance culture and measurement.