PurposeThe teacher role in the classroom can explain important aspects of the student's school experience. The teacher-student relationship, a central dimension of social capital, influences students' engagement, and the teaching style plays an important role in student outcomes. But there is scarce literature that links teaching styles to teacher-student relationship. This article aims to (1) analyze whether there is a relationship between teaching styles and the type of relationship perceived by students; (2) test whether this relationship is equally strong for any teaching style; and (3) determine the extent to which students' perceptions vary according to their profile.Design/methodology/approachA structural equation model with four latent variables is estimated: two for the teacher-student relationship (emotional vs educational) and two for the teaching styles (directive vs participative), with information for 21,126 sixth-grade primary-students in 2019 in Spain.FindingsTeacher-student relationships and teaching styles are interconnected. The participative style implies a better relationship. The perceptions of the teacher are heterogeneous, depending on gender (girls perceive clearer than boys) and with the educational background (children from lower educational background perceive both types of teaching styles more clearly).Originality/valueThe analysis is based on the point of view of the addressee of the teacher's work, i.e. the student. It provides a model that can be replicated in any other education system. The latent variables, based on a periodically administered questionnaire, could be estimated with data from diagnostic assessments in other countries, which in turn would allow the formulation of context-specific educational policy proposals that take into account student feedback.